On Not in List Event

G

Guest

I have a combo box that uses a macro to open a custom form to add a new item
to the list. Can I prevent the standard Access dialog box "Item enter is not
in list..." from displaying?

Thanks for your help!
 
T

tlyczko

Search this NG for "notinlist event" and you will find much code for
handling this.
Tom
 
M

Marshall Barton

Marianne said:
I have a combo box that uses a macro to open a custom form to add a new item
to the list. Can I prevent the standard Access dialog box "Item enter is not
in list..." from displaying?


Set the Response argument to acDataErrAdded.

See the Help topic NotInList Event for details.
 
G

Guest

I'm not sure I understand your reply...

"Set the Response argument to acDataErrAdded".

Where do we find the Response argument?
 
D

Douglas J Steele

The declaration for the NotInList event will be something like:

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

Inside the routine, you need a line of code

Response = acDataErrAdded
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top