Lookup fields

D

DaveB

I have a lookup field called City Name where it looks up
citys for me. The problem that I'm having is that I need
to enter a city that isn't on the original list. I tried
adding it onto the table that the lookup field comes from
but when I type the new city into the field it says, "The
text you entered isn't in the list. Select an item from
the list, or enter text that matches one orf the listed
items. Is there a way to make my field accept new names
and then also add them to the list?
 
J

Jeff Boyce

Dave

A review of the tablesdbdesign newsgroup and the MVPS.org website will
reveal that there's a strong consensus against using the lookup data type
for a field in an Access table. It causes confusion because it stores an
undisplayed ID#, but displays something else (like a CityName).

Since you are working directly in the table, you have no way to intercept
the fact that "Sequim, WA" isn't in your list of cities. You need to be
working in a form, where there is a rich "event" environment. You can use
the NotInList event to code a procedure to add a new City.
 

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

Similar Threads


Top