NES said:
Roger, I added the CancelEvent to the beginning of the macro that opens up
the new form, but it does not clear previous form.
I've tried using the SendKeys {esc} twice before calling the other form, but
that doesn't work either.
lookup "CancelEvent" which undoes events
[quoted text clipped - 13 lines]
If you just need to clear the data from the combo box, see the help about the
NotInList Event:
The NotInList event occurs when the user enters a value in the text box
portion of a combo box that isn't in the combo box list.
Private Sub object_NotInList(NewData As String, Response As Integer)
Object The name of a combo box control.
NewData A string that Microsoft Access uses to pass the text the user
entered in the text box portion of the combo box to the event procedure.
Response The setting indicates how the NotInList event was handled. The
Response argument can be one of the following intrinsic constants:
Constant Description
acDataErrDisplay (Default) Displays the default message to the user. You can
use this when you don't want to allow the user to add a new value to the
combo box list.
acDataErrContinue Doesn't display the default message to the user. You can
use this when you want to display a custom message to the user. For example,
the event procedure could display a custom dialog box asking if the user
wanted to save the new entry. If the response is Yes, the event procedure
would add the new entry to the list and set the Response argument to
acDataErrAdded. If the response is No, the event procedure would set the
Response argument to acDataErrContinue.
acDataErrAdded Doesn't display a message to the user but enables you to add
the entry to the combo box list in the NotInList event procedure. After the
entry is added, Microsoft Access updates the list by requerying the combo box.
Microsoft Access then rechecks the string against the combo box list, and
saves the value in the NewData argument in the field the combo box is bound
to. If the string is not in the list, then Microsoft Access displays an error
message.