validation rule to a combo box?

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

Guest

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?
 
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?
 
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?
 
luscioussarita said:
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.

Setting the LimitToList property to True will only allow the user to make
existing choices. They will still be able to "type" in the ComboBox, but
nothing will be accepted unless it is an exact match for one of the choices.
 
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
 
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.
 

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

Similar Threads


Back
Top