LIST BOX

S

Sue

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.
 
K

Kevin McCartney

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.
 

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