#NAME? Error on Form

R

Rob B.

I want some form fields to automatically populate with data once another
field on the form is filled in. Specifically, I want a city and state to
fill in automatically once a zip code is entered.

My table tblZipCodes has 3 fields: fldZip, fldCity, and fldState

My query qryZipCodes has an expression, expCitySt, which combines fldCity
and fldState, which looks like, expCitySt: [fldCity] & ", " & [fldState].
The expression produces the desired result in the query

On the form when I enter a valid Zip Code from tblZipCodes, the field that
points to qryZipCodes.expCitySt, just returns #NAME?.

Ideas?


Rob B.
 
U

UpRider

Rob, there's a problem with zipcode city-state lookups. The problem is that
zipcodes cover more than one city, or in other words, several cities can
have the same zipcode.
Download and look at http://www.dbtc.org/zipmdb\ziplookup.zip
This is a small db that demonstrates how to automatically enter the city and
state when the zipcode is typed in a form. If the zip covers more than one
city, a popup lists the cities and asks you to choose one.

HTH, UpRider
 
B

BruceM

Is expCityState included in the form's Record Source (and therefore
available on the form's Field List)? Are you linking to tblZipCode from
your main table, or are you copying the values, or what exactly? In asking
this I assume that there is another table with some kind of personal
information, and that tblZipCode offers a shortcut for including some of the
information.
 

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