Combobox Not InList message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

How can I surpress the message you get when record not found in the Limit to
list from within the Combobox...?
This is not an error message but one built in to Access.

I want to tell the user that they need to enter this custoemr into another
area first before they enter it here ...etc.
 
One way to go about this would be to set Limit to list = False and do your
own check.

For example, after the user enters info into the combo box, use code in
either the LostFocus or the AfterUpdate event to check the information in the
combo box against the set of values allowed; this should be easy if your
rowsource for the combo box is a table.

If the string value in the combo box is not allowed, then use a MsgBox to
give them a customized error message, and you can automatically clear the
combo box (or not).

HTH,

Nick
 
How can I surpress the message you get when record not found in the
Limit to list from within the Combobox...?

Look up help for the NotInList event.


Tim F
 
Use the NotInList event, do whatever suits you, and issue

Response = acDataErrContinue
 
Check out the OnNotInList event in Help, there should be a code example
there that will show you how to handle the error. Let me know if its not
there and I'll post sample code here.
 
Back
Top