>I have a form that allows editing of records. I want to be able to cancel the edits or save them. My cancel isn't working properly. I click on my edit button and it allows the user to edit the record. The user can then hit the save or cancel buttons. If the user hits cancel I want all the changes made not to show up but they do. How can I fix this? Here is my code for the edit, and cancel buttons.
>
>When user clicks on edit.
>
>m.isediting2 = .T.
>*return to the record when cancelling
>prevrec = recno()
>
>
>When user hits cancel
>
>*go back to the record before edits were made
>go prevrec
>thisformset.refresh
>
>This isn't working and the edits are being stored in the table temporarily. The edits aren't saved but they stay in the table till I exit the application and run it again. What can I do to cancel the edits?
>
>Thanks,
>Tyler
One approach is to use buffering and then TABLEUPDATE() / TABLEREVERT() as necessary. Look in the VFP help; also there are articles here on the UT that address this topic.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up