append query discrepancy

A

Adam Brace

I have an append query that is outputting to a table that I use for mail
merge. The problem is in the table view of my query, I see the correct
information in certain fields like "City, State, Zip" in the regular format
of, say, "Elmira, NY 14905". When I go into the table that the query is
outputting to, in the "city, state, zip" field I get a number, which
corresponds to the ID Autonumber that corresponds with each city, state, and
zip in the table the query is pulling it off of. Any idea how to fix this? I
can send a copy of the mdb. Please feel free to e-mail me at
[email protected]
 
J

Jason Lepack

The reason is that you have a lookup field in your table.

The Evils of Lookup Fields in Tables:
http://www.mvps.org/access/lookupfields.htm

I'm assuming that you have tables similar to this:

City:
cityID, CSZ
1, 'Elmira, NY 14905'
2, 'Douglas, ON, K0J 1S0'
3, 'Somewhere, XY, 12345'

Person:
personID, personName, cityID
1, 'Jason Lepack', 2
2, 'Adam Brace', 1

Now, you have a lookup field on cityID in Person, so your Person table
looks like this:
Person:
personID, personName, cityID
1, 'Jason Lepack', 'Douglas, ON, K0J 1S0'
2, 'Adam Brace', 'Elmira, NY 14905'

Right?

In your query, you need to add both tables to the query. Make sure
they are joined on CityID and add the CSZ field into your query.

Cheers,
Jason Lepack
 
Top