LIST BOX

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

Guest

I have a field containing a list box. This box referencing items in a table which also have a true or false yes/no etc

If the box is checked the item doesn't appear in the list box when user's are looking for particular codes that have been inactivated

The problem I have is that if you still type in the code it will accept it. Is there a way around this

Thanks in advance.
 
Hi Sue,
You need to use the On Not In List Event and set the Limit To List property to True. The Limit To List Property you'll find on the DATA tab of the properties window. With the Not In List event you need to place some code, something like this

Response = acDataErrContinue
strFrmMsg = "The item you have entered does not appear in the list." & vbCrLf
strFrmMsg = strFrmMsg & "You must select and item from the list."
MsgBox strFrmMsg, vbOkOnly Or vbInformation

Hope that helps

----- Sue wrote: -----

I have a field containing a list box. This box referencing items in a table which also have a true or false yes/no etc.

If the box is checked the item doesn't appear in the list box when user's are looking for particular codes that have been inactivated.

The problem I have is that if you still type in the code it will accept it. Is there a way around this?

Thanks in advance.
 
Back
Top