Combo Box - On Not in List Event

R

R. BRADFORD THOMAS

Good Evening,
I am using Windows 2000 and Access 2000.

In the "On Not in List" Event of a Combo Box I am doing some coding. When I
enter the Event I get a standard message telling me that the item entered is
not in the list etc.

I am aware of this. How do I turn this message OFF, or at least change what
is being displayed???

Brad
 
F

fredg

Good Evening,
I am using Windows 2000 and Access 2000.

In the "On Not in List" Event of a Combo Box I am doing some coding. When I
enter the Event I get a standard message telling me that the item entered is
not in the list etc.

I am aware of this. How do I turn this message OFF, or at least change what
is being displayed???

Brad

Beside turning off the message what is it you wish to do about the
item that's not in the list?

Use
Response = acDataErrContinue
and add your own msgbox.

MsgBox "You made a goof."
Response = acDataErrContinue
 
G

Graham Mandeno

Hi Brad

I think you are mistaken. This message should not appear until *after* your
NotInList code has run. You suppress it by setting the value of the
Response argument in the NotInList event procedure.

You can either:
1) set Response to the value acDataErrContinue, which acknowledges the
value is not in the list, but suppresses the message, or
2) take action to add the entered value to the list, and set Response to
acDataErrAdded, which suppresses the error, requeries the list, and causes
the combo to "try again".

The other argument to the NotInList event procedure is NewData, which is the
text that the user typed into the combo. You can use this to display your
own message, and/or to add the new value to the list.
 
R

R. BRADFORD THOMAS

You are right Graham,

Thank you for the Information.

Brad

Graham Mandeno said:
Hi Brad

I think you are mistaken. This message should not appear until *after* your
NotInList code has run. You suppress it by setting the value of the
Response argument in the NotInList event procedure.

You can either:
1) set Response to the value acDataErrContinue, which acknowledges the
value is not in the list, but suppresses the message, or
2) take action to add the entered value to the list, and set Response to
acDataErrAdded, which suppresses the error, requeries the list, and causes
the combo to "try again".

The other argument to the NotInList event procedure is NewData, which is the
text that the user typed into the combo. You can use this to display your
own message, and/or to add the new value to the list.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

R. BRADFORD THOMAS said:
Good Evening,
I am using Windows 2000 and Access 2000.

In the "On Not in List" Event of a Combo Box I am doing some coding.
When
I
enter the Event I get a standard message telling me that the item
entered
is
not in the list etc.

I am aware of this. How do I turn this message OFF, or at least change what
is being displayed???

Brad
 

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