validation rule to a combo box?

L

luscioussarita

I have created a combo box with 3 columns which pulls data from a data table
and the drop down menu works perfectly. But, I would like to set up a
validation rule that prohibits you from entering data into that drop down
menu that is already set up.

I tried this
"[City]" or "[State]" or "[Country]"

But it gets stuck there and I can't tab over.
Any suggestions?
 
R

rowiga

luscioussarita said:
I have created a combo box with 3 columns which pulls data from a data table
and the drop down menu works perfectly. But, I would like to set up a
validation rule that prohibits you from entering data into that drop down
menu that is already set up.

I tried this
"[City]" or "[State]" or "[Country]"

But it gets stuck there and I can't tab over.
Any suggestions?

If you're loading the combo box with table data then you're determining the
allowed selections with your query already. What is it that you want to
validate?
 
L

luscioussarita

I am sorry I didn't clarify myself. I want to prohibit users from entering
any data in the drop down field. This is going to be a survey and I don't
want the users to be able to enter data but to answer what is already
provided for them in the drop down menu. Maybe instead of a validation rule
I could use something else to restrict them from entering data. For right
now I am adding all the drop down menu within the table until they are
finalized for the forms.

I know its a simple thing to restrict the field but I can't remember. Let
me know if this makes any sense.

Thanks... Sarita

rowiga said:
luscioussarita said:
I have created a combo box with 3 columns which pulls data from a data table
and the drop down menu works perfectly. But, I would like to set up a
validation rule that prohibits you from entering data into that drop down
menu that is already set up.

I tried this
"[City]" or "[State]" or "[Country]"

But it gets stuck there and I can't tab over.
Any suggestions?

If you're loading the combo box with table data then you're determining the
allowed selections with your query already. What is it that you want to
validate?
 
L

luscioussarita

Rick Thank you this worked beautifully. For my edification, is there any way
to prevent a user from typing in the field at all? Or is this beyond the
capabilities of Access?

Sarita
 
R

Rick Brandt

luscioussarita said:
Rick Thank you this worked beautifully. For my edification, is there
any way to prevent a user from typing in the field at all? Or is
this beyond the capabilities of Access?

AFAIK you would have to capture keystroke events for the control and cancel
them, but that would defeat the AutoExpand feature as well which (I assume)
you wouldn't want to do.
 
Top