View Full Version : continue with next event after error


wazz
08-06-2007, 09:22 AM
i have a combobox on a form that users can use to jump to a record of their choosing. if a user starts by typing a name in the cbobox and they discover the name does not exist they will (usually) click on the navigation button to jump to a new record. this leads to a NotInList error. i get around this error with the following:
Response = acDataErrContinue
Me.cboSelect.Undo

this works (other suggestions welcome), however, the user's last action (clicking the navigation button) is "forgotten" and the user must click the new record button a second time. is there a way to "remember" or track and continue with the users last action/event in this case?

Guus2005
08-07-2007, 03:03 AM
Set limit to list to False and and the OnNotInList error doesn't occure anymore.

HTH

wazz
08-08-2007, 01:07 PM
hi. that could work but is not what i'm looking for in this case. i'm trying to find a way to continue with the user's action after dealing with the error.

Guus2005
08-08-2007, 10:38 PM
Seems like Access purges the events after handling the error.
If the error happens after a specific event and the event itself was not triggered, you have to control the flow yourself by entering the procedure yourself. Enter e.g. btn_Click() in the error part of the event that wás triggered.

HTH