Combo box error message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a combo box that is set to list only. When a user tries to input
something else Access gives a message box saying the value is not in the list.

How can I change this message to my own?

I tried on error in the forms property. It did bring up my message box, but
it also brought up the Access message as well.
 
Keith said:
I have a combo box that is set to list only. When a user tries to input
something else Access gives a message box saying the value is not in the
list.

How can I change this message to my own?

I tried on error in the forms property. It did bring up my message box,
but
it also brought up the Access message as well.

You need to determine the error number and trap it, something like

If Err.Number = nnnn Then
'Your custom message box
Else
MsgBox Err.Description
End If

HTH - Keith.
www.keithwilby.com
 
Private Sub Combo1_NotInList(NewData As String, Response As Integer)
MsgBox "Invalid value, you knucklehead!"
Response = acDataErrContinue
End Sub
 
Back
Top