continue with next event after error (1 Viewer)

wazz

Super Moderator
Local time
Today, 07:41
Joined
Jun 29, 2004
Messages
1,711
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:
Code:
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?
 
Last edited:

Guus2005

AWF VIP
Local time
Today, 01:41
Joined
Jun 26, 2007
Messages
2,641
Set limit to list to False and and the OnNotInList error doesn't occure anymore.

HTH
 

wazz

Super Moderator
Local time
Today, 07:41
Joined
Jun 29, 2004
Messages
1,711
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

AWF VIP
Local time
Today, 01:41
Joined
Jun 26, 2007
Messages
2,641
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
 

Users who are viewing this thread

Top Bottom