Listbox NotInList error message

Pedro Magueija

Registered User.
Local time
Today, 15:27
Joined
Nov 21, 2003
Messages
13
Hellozz ppl!!!
How can I disable the error message that appears after we entered a not in list value?

I´ve read articles on this and tried the following code:

Private Sub cod_cli_NotInList(NewData As String, Response As Integer)

DoCmd.SetWarnings False
MsgBox "Por favor insira um código de cliente válido.", vbOKOnly, "Aviso"
cod_cli.Undo
cod_cli.SetFocus
DoCmd.SetWarnings True

End Sub

...but it didn't work. I still get the message "Please select an item from the list." Not this message (mine is in portuguese), but you know what I mean.
Please help me.... thanks in advance.
 
use the onNotInList event and set the response to acDataErradded.

There is a good example of this in the FAQs.
 
here is a link to the example in the FAQ
 
done

maxmangion said:
here is a link to the example in the FAQ

Thanks... I added:

response = acDataErrContinue

...and the message is now gone... thanks again for the link...
 
you're welcome ... glad you solved the problem! ... btw the thx should go to Mile-O-Phile for sharing his knowledge.
 

Users who are viewing this thread

Back
Top Bottom