Postcodes

G

Gary T.

Another table called tbl_Customers has the following fields:
JobNo (primary key)
fkeyQuoteNo
SiteName
SiteAddr1
SiteAddr2
CompanyName
CompanyAddr1
CompanyAddr2

I have a table called tbl_Postcodes which has the following fields:
fkeyJobNo
Suburb
State
Postcode

I have entered all the relevant suburbs with their respective state and
postcodes.

The relationship between these two tables is tbl_Customers
(One) -------------- (Many) tbl_Postcodes
The fkeyJobNo in tbl_Postcodes is not set as the primary key in that table.

A form called frm_Customers contains the all fields from both tables. A
query called qry_srch_customers is associated with this form.
The suburb field (multi column combo box) in the form contains the following
in its Row Source:

SELECT [tbl_Postcodes].[Suburb], [tbl_Postcodes].[State],
[tbl_Postcodes].[Pcode] FROM tbl_Postcodes ORDER BY [Suburb], [State];

This suburb field -multicolumn combo box has 3 columns comprising of
Suburb,State and Postcode. As it stands, it simply adds the selected suburb
in the suburb box field.

Q1. I would like to be able to select from this multi column suburb field
and then to see the other 2 fields (State and Postcode) automatically
populated by the choice i make from the suburb combo box field as well. Can
anyone provide me with a code expression.

Q2. As you can see in the tbl_Customers, I have to work with 2 different
kinds of addresses. The Site address and the Company address. Would I have
to create 2 seperate kinds of postcode tables ?
Thanks in advance.
 

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