Lookup fields

  • Thread starter Thread starter DaveB
  • Start date Start date
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?
 
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.
 
Back
Top