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?
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.
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).]