"limit to list" code to switch the settings to False

mazza

Registered User.
Local time
Today, 12:18
Joined
Feb 9, 2005
Messages
101
I have a combo field that has its properties set to "Limit to List" = yes.

I would like to add an on enter event where I could make an exception eg
if me.type = "AAA" then
notinlist = false
else not in list = true
end if

Now from the above it is obvious that I don't know the code to switch the not in list settings off.

Does any one knows the code for this?
 
According to the A2K3 help file, you can set this at run-time.

The syntax is:
Code:
' setting True
Forms("YourFormNameHere").Controls("YourComboBoxNameHere").LimitToList = True 

' setting False
Forms("YourFormNameHere").Controls("YourComboBoxNameHere").LimitToList = False

So, you can set it depending on your entry. You will probably want to use the one to set the limit to list to true in the On Current event, so each record as it comes up will start with the limit to list as true. Then, you can modify based on the entry of whatever control you are using to allow the change.
 

Users who are viewing this thread

Back
Top Bottom