I am trying to create a report that will return a companies main zip code plus the zip codes of any additional locations (if any). The report is actually a letter about a specific client. Basically it says, Client “A” is now sold and needs pertinent information regarding our products in the following zip codes:
I have a table of Client information (name, address, city, state, zip, etc.)
I have a table of extended client information (ExtendedID, ClientID (as a foreign key), Owner’s name, Description of Operation, and a cell for whether this client is currently quoted, sold, or declined)
I have a table for additional location addresses. (LocationsID, ClientID(as a foreign key), Address, City, State, Zip) Some clients have additional locations but of course most do not.
I have related the tables together with autonumber fields. (ie: ClientID, ExtendedID, LocationsID)
My relationships seem to have pulled things together nicely except I don’t understand how to create a query to support this report that is needed.
I ran a query that collects information from these tables, (client name, clientzip, quotestatus “criteria = “sold”, locationzip.
This works fine so long as a client is sold AND has additional locations, but for clients who are sold and have only one location, the query is excluding them. I read something about using an Nz Function but I am not familiar with VB and barely understand macros.
Any help for how to get around this problem would be appreciated.