Drop down allowing other values

domtrump

Board Regular
Joined
Apr 1, 2010
Messages
245
I have a ComboBox control on my form (bound) that has two choices for the user to select. However, they are still able to type values other than the two I specified. The following properties are set:

Limit to List = Yes
Allow Value List Edits = No
Show only row source values = Yes

What am I missing?

Thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
What happens when the type something not on the list and try to move to another field and/or save the record?

What do you want to happen?
 
Upvote 0
What happens when the type something not on the list and try to move to another field and/or save the record?

What do you want to happen?

It accepts the value and moves on. I want the user to ONLY be able to select one of the values in the drop down.
 
Upvote 0
Make sure you don't have anything in the ON NOT IN LIST event. But it may be corruption sneaking into the form. Try this - open a new, blank database file and import that form. Then from your current one, import it back in (make sure to turn Name AutoCorrect off before you do this) and then open it and see if it does the same thing. If it then works, delete the form that didn't work and then rename the one you imported back in to the old name.
 
Upvote 0
Does the control source of the combobox have a default value?
 
Upvote 0
Make sure you don't have anything in the ON NOT IN LIST event. But it may be corruption sneaking into the form. Try this - open a new, blank database file and import that form. Then from your current one, import it back in (make sure to turn Name AutoCorrect off before you do this) and then open it and see if it does the same thing. If it then works, delete the form that didn't work and then rename the one you imported back in to the old name.

I followed these steps, but I get the same result. I can still type whatever I want in this field.
 
Upvote 0
Does the control source of the combobox have a default value?

No, it does not have a default value. I don't want a value pre-selected since this will affect other values on the form. I don't want them to accidentally take the default - they need to choose every time.
 
Upvote 0
I can't recreate this problem.

Is there definitely nothing else going on?
 
Upvote 0
OK, I found it (though I still don't quite understand it). Access basically ignored the properties I set on the control and used the properties on the bound field itself. When I went in to the the design of the table itself, I was able to change the settings on this field to those described abouve (on the Lookup tab) and I now get the desired behavior in the form. Guess I was wrong for thinking the form control's properties would override the fields properties. (I kind of wanted to do it this way so that I could change the value in the table if I needed to, but users who were using the form couldn't).

Anyway, thank you both for your help. One last thing, is there a way to NOT let the user tab out of this field if they have NOT made a selection? I know it wont let them add the record until they do, but it would be nice to freeze them in their tracks until they choose one of the options.

Thanks.
 
Upvote 0
It should do that if you've set Limit to List to Yes.
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,286
Members
449,076
Latest member
kenyanscott

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top