Rx_
Nothing In Moderation
- Local time
- Today, 15:02
- Joined
- Oct 22, 2009
- Messages
- 2,803
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
20 Me.rsAddNew.Delete
30 Me.rsAddNew.Bookmark = rsAddNewBookmark
40 Else
50 rsAddNew.CancelUpdate ' was still (new) record
70 End If
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
20 Me.rsAddNew.Delete
30 Me.rsAddNew.Bookmark = rsAddNewBookmark
40 Else
50 rsAddNew.CancelUpdate ' was still (new) record
70 End If