Auto Populating city, state and county based on the zip code.


M

matrix7410

Hello,
I have a data entry form where if you enter a zip code and press F9,
than the city, county, and state fields gets automatically populated.
This auto populate was done from a table that has all the listings of
the zip, city, state and county info. I than added the following
expression into the control source of the city, state and county
fields. I adjusted the formula based on the field.
=DLookUp(" [ListingofAllUSAZipCode]!
[City]","[ListingofAllUSAZipCode]","[ListingofAllUSAZipCode]![ZipCode]
= [Zip]")

This formula works great - but is there a way to eliminate pressing F9
to populate the data? Also, I have a table that stores all the info
from the data entry form and I've noticed that the city, state and
county does not get pouplated in the table. It does get populated on
the data entry form but does not carry it over to the storage table.
Does anyone have any idea why that happens and any suggestion on how I
could fix it? thanks!
 
Ad

Advertisements

D

Duane Hookom

I'm not sure why you posted this in the Reports news group. However, I would
probably use a combo box for the zip code entry. The Row Source of the combo
box can include all the extra columns you want to display in the form. Just
set other control sources to something like:
=cboZip.Column(1)
Columns are numbered beginning with 0.
 

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