difference between clicking and calling click event in command button?
A form for a dropdown list box with an add new mode has a "Continue" and "Undo" command button with code.
When using the command buttons, the applications works perfectlly.
The customer doesn't like "accept" or "undo" buttons and wanted a Message Box with a Yes/NO (I know, but it is a culture here).
So, I added a message box:
YES has code to Call Continue_Click and it works like a charm.
NO has code to Call Undo_Click - and it fails.
If I click Undo command button directly, it works, setting the pull down list box back to the orginal value.
But, using the Call method, it runs the code (seen in debugger) but won't reset the pull down list box to its orginal value.
(there are no local variables in the click event)
Have also moved the focus off of the dropdown.
Just wondering why the difference?
There must be some other event going on.
10 If Not IsNull(Me.rsAddNew.Fields(1).Value) Then
30 Me.rsAddNew.Bookmark = rsAddNewBookmark
50 rsAddNew.CancelUpdate ' was still (new) record
70 End If