Hi
I have 2 combo boxes on a form. When the user inputs something that is not
in the list, error 2237 is generated (what you have entered is not in the
list... please select an item in the list.) In the form's On error event, I
have changed this message to a custom message in user friendly language
relevant to the first combo.
However, if the user makes the same error in the second combo, of course the
same error is generated and the user is greeted with a message relating to
the first combo. Is there any way I can trap the error generated at the
"combo" level rather than at the form level, and display a relevant error
relating to that specific combo?
TIA
Rich
Dennis - 11 Oct 2005 11:27 GMT
Use the property 'On Not in List' of each combo box and put your own Message
and then set response = 0.
e.g.
Private Sub Combo1_NotInList(NewData As String, Response As Integer)
MsgBox "First combo box message"
Response = 0
End Sub
Private Sub Combo2_NotInList(NewData As String, Response As Integer)
MsgBox "Second combo box message"
Response = 0
End Sub
> Hi
>
[quoted text clipped - 12 lines]
> TIA
> Rich
Rich1234 - 11 Oct 2005 13:26 GMT
Thanks Dennis for the advice... it has sorted the issue
rich
> Use the property 'On Not in List' of each combo box and put your own Message
> and then set response = 0.
[quoted text clipped - 25 lines]
> > TIA
> > Rich