Jovalle
04-11-2000, 09:04 AM
I added Cancel button using Undo command on data entry form but getting an error message ("undo action isn't available now"). How do I fix this problem?
|
View Full Version : Cancel button on data entry form Jovalle 04-11-2000, 09:04 AM I added Cancel button using Undo command on data entry form but getting an error message ("undo action isn't available now"). How do I fix this problem? Pat Hartman 04-11-2000, 12:58 PM Undo only works on a bound form and I believe it only works BEFORE the record is saved. S 04-12-2000, 02:45 PM Try to use the Begintrans, Committrans and Rollback function to undo operation even after hundreds raws of commands or records; I found them very useful. Hope this helps you, S. R. Hicks 04-12-2000, 03:37 PM Pat is correct, to my knowledge, you must do this before the record is actually saved. But it is very simple. Using a cmdButton named cmdCancel, here is all it takes: Private Sub cmdCancel_Click() Me.Undo End Sub Now if the record has been saved, you will need different code to delete record. Good Luck, RDH [This message has been edited by R. Hicks (edited 04-12-2000).] |