Query if any changes have been made

bunji

Registered User.
Local time
Today, 15:44
Joined
Apr 26, 2005
Messages
124
I have created a button to save changes and to undo changes on a form. However if the user has not made any changes, i get a message saying that the Undo command is not available and the same with save changes.

Therefore if no changes had been made i would like to just ignore that part of the action and continue with the rest of the event procedure.

My code for undo is..

Public Sub UndoChanges_Click()

DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
Me.frmtabContact_Details.Enabled = False
Me.frmtabCustomer_AC.Enabled = False
Me.frmtabCustomer_Options.Enabled = False
Me.Edit_Contact.Visible = True
Me.Edit_Contact.SetFocus
Me.frmSave_Changes.Visible = False

End Sub
 
maybe making the undo button invisible until the form is dirty will work for you.
put all the other .Visible properties, etc. on the form's open event, or current event or something similar.
 

Users who are viewing this thread

Back
Top Bottom