adding values to the underlying table of a combo box?

G

Guest

I want to use a combo box to enter values in a form (From an underlying
table). However, if the value is not in the table, I want to be able to add
it to the table - preferably without re-entering the text- and as invisibly
as possible.
How is this done? I have tried to use the OnNotinList event to write a
macro, but it doesn't work and I keep getting the message that the walue is
not in the list.
 
D

Douglas J. Steele

I'm not sure you can add a value through a macro and have it work: I think
you need to use VBA.

That's because once the value has been added, you need to set

Response = acDataErrAdded

in your code, to indicate to Access that the value has, in fact, been added.
 
G

Guest

Generally speaking this is not a good idea.
In my experience, you will end up with multiple mispellings of the same thing.
For instance entering a name of O'Neill, you could end up with
O Neill
ONeill
OhNeill
O'Niell
O'Neil etc. etc.

-Dorian
 
R

Ron2005

It is a law of experience: If you do not limit the choice, no matter
how much help you give to select/suggest the right one, users will
mis-spell it. The higher the number of users the higher the number of
mis-spellings.
 

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

Top