Combobox entries

Is there a way to allow a user to enter a value in a combobox that isn't in the query, therefore in the table, that the user sees when they look at the drop-down list of values?  I know they can add to the list if I provide a form to add a value with.

But is there a way they can add to the list "on the fly" without being taken to the form first?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Yes, you can write code to do this in the NotInList event.

Personally, I don't recommend allowing adding items to combos on the fly.  It makes the user too lazy and they add typos that they wouldn't add in a more controlled situation.  In fact, in some environments, it is almost as bad as not using combos at all since the users can enter anything they want.  I've never actually run into a situation where it wasn't possible to update the combos ahead of time although I am prepared to believe that some day I might encounter one.  Otherwise I would say to never allow it.
Jeffrey CoachmanMIS LiasonCommented:
There are literally dozens of ways to do this...
All basically the same.
Here is a popular link:

It all depends of how "automated" this needs to be...

Like Pat, I tend to make users go to the main form and add entries...
For example, ...In the Customer form there may be certain validation you are using that will be lost when you have separate code to add customers in the combobox NotInList event.

But we all know that each interface is different, you can select the technique that is best for your situation...


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jeffrey CoachmanMIS LiasonCommented:
The other downside to adding items dynamically is that you need to consider that there may be other fields that need to be added to the record.

At the very least, adding items automatically should perhaps be limited to certain users, ...not available to all users...

For example, something like this:
...If UserAccess="Admin" then

SteveL13Author Commented:
You have both done a great job of convincing me that I should not go this route.  Thank you once again for the support.
Jeffrey CoachmanMIS LiasonCommented:

It's not that you shouldn't, ...its just that it can lead to problems...
If you have very high level users (For example, 4 elite sales people who know your customers) then adding a customer on the fly would be OK...
But if you have low level users who are looking for the product: "1llIi1O0O00li1l", and they miss-read it, ..then they will think they have to add it...
...I am sure you can see what that might lead to...

In the end it is always good to know the technique, just in case...

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.