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?
SteveL13Asked:
Who is Participating?
 
Jeffrey CoachmanMIS LiasonCommented:
There are literally dozens of ways to do this...
All basically the same.
Here is a popular link:
http://allenbrowne.com/ser-27.html

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, ...so you can select the technique that is best for your situation...

;-)
JeffCoachman
0
 
PatHartmanCommented:
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.
0
 
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


JeffCoacman
0
 
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.
0
 
Jeffrey CoachmanMIS LiasonCommented:
;-)
Thanks

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...
;-)

Jeff
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.