Not in list

G

Gaetan

Anyone can advise how can I get rid of the "not in list" error message Access
gives when we try to put in text that is not part of a combo box?

Thanks.
 
A

ALESSANDRO Baraldi

Gaetan said:
Anyone can advise how can I get rid of the "not in list" error message Access
gives when we try to put in text that is not part of a combo box?

Thanks.

May be this one solution...?

Private Sub Form_Error(DataErr As Integer, Response As Integer)
Select Case DataErr








' --------------------------------------------------------------------------
---------------
' This to prevent "<NOT IN LIST> on Combo(s) if it's not allowed








' --------------------------------------------------------------------------
---------------
Case 2237 ' NOT IN LIST
Response = acDataErrContinue
Screen.ActiveControl.Undo
Case Else
Response = acDataErrDisplay
End Select
End Sub
 
F

fredg

Anyone can advise how can I get rid of the "not in list" error message Access
gives when we try to put in text that is not part of a combo box?

Thanks.

What do you want to do with the text that you tried to place in the
box (besides get rid of the message)?
Save it? Delete it?
 
Top