Table that accepts only certain values

amerifax

Registered User.
Local time
Today, 03:36
Joined
Apr 9, 2007
Messages
304
I want my table to accept only certain values in a field. I tried different things with no luck.

Field: OCC (except only 1 or 2)

I tried Validation Rule using Expression Builder, which did not work for me.

I also tried creating a default value of the same field. What I'm trying to do is have 1 come up as a default, and have the ability to change it to 2 if needed. But only have the ability to type in a 1 or 2.

Bob
 
Last edited:
Open the table in design view and click on the OCC field. Down below click on the 'Lookup' tab, set Display Control to 'Combo Box', set Row Source Type to 'Value List', set Row Source to '1;2', set Limit To List to 'Yes'.
 
I'm using a form. Would I make these changes in my table or in my form. I would do a test, but my results are not very exacting.

Bob
 
What is "Limit To List to 'Yes'" doing for me. It seems to work either way.
Bob
 
Without LimitToList the user can key in any number they like.
 
So if "LimitToList" is set to yes, the values set Row Source to '1;2' would be like a dead issue. it would accept anything. But if I set "LimitToList" to no it will only accept 1 & 2.?
Bob
 
Correct idea but in reverse to what you actually posted.

Think about the name of the property and image what it would mean. You have a list as the RowSource. If the value was limited to the list what would you expect to happen?

Moreover, surely it is easier to test this than bother posting for clarification.
 

Users who are viewing this thread

Back
Top Bottom