Changing the Limit to list property

M

mrrherrera

I have a table that has two items, ID and City. I am running Access 2003. I
created a form and put a combo box to look up the cities. However, I want
the user to be able to add a city to the list if it is not in the list.
There is no code that I can see that affects the limit to list property, just
the drop-down box with the Yes or No. When I change it to No, I receive an
error stating I need to change the Column width. The default on the column
width is 0";1". If I change either of these values, then a number shows up
in the city box. I don't know what code to put in to allow the addition of
the city or where to put. I looked at other threads that addressed this, but
when I tried some of the code, I put it in the event On Enter, it did not
work. Please help.
 
D

Dorian

Rather than type a long explanation here, I'd advise you to look in Access
Help for 'Limit to List'. It has a fairly extensive explanation of this
property and how to handle adding elements to a list. Adding elements to a
list this way is problematic since you will probably end up with multiple
mispelled entries representing the same item.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
D

Dorian

You will also need to lookup the 'NotInListEvent' - this event is triggered
whenever you enter a name that is not already in the list.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 

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