Disable Error Messages

M

Matt Howard

On my form I have a list box with names of employees.
When you try to enter a name that is not on the list, I
have a message box come up that informs them of this and
the procedure to follow. What I need is to disable the
default not in list message that Access provides. I use
Access 2003, and I have the following code:

DoCmd.SetWarnings False

I was under the impression that this killed the error
messages but it does not.

Any help is appreciated.

Thanks,

Matt Howard
 
K

Ken Snell

In the code that you run on the NotInList event, include this step:

Response = acDataErrContinue

That will bypass the built-in ACCESS message.
 
M

Matt Howard

Thanks, that worked like a charm.

I'm still new to VB and VBA, I'm not sure I completely
understand what that command does.

Matt
 

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