Why not make a new query containing all the fields from both tables,
make a new form with all the relevant data
The following code will place all of the Customers details into the
fileds by just selecting the Customer via a combox, where the
CustomerId is the Customer Name
I hope it helps
In the [CustomerId] field on the form go to properites, AfterUpdate:
and write code.
Private Sub CustomerID_AfterUpdate()
On Error GoTo TrapAnError
' Update City controls based on value selected in CustomerID combo
box.
Me!Name = Me![CustomerID].Column(1)
Me!Address = Me!Address
Me!City = Me!City
Me!Region = Me!Region
Me!PostalCode = Me!PostalCode
Me!Country = Me!Country
Exit_CustomerID_AfterUpdate:
Exit Sub
"djm" <tezoza (AT) earthlink (DOT) net> wrote
Quote:
I have a table and a form with about 100 zip codes and their corresponding
cities. I have another table and form that will contain each person's full
address. To reduce work I would like the "City" field in the address part of
the form to be automatically entered once a zip code is entered. I assume it
can get the data from the early table i created with just the cities and
zips on it, but I just figure out how to do it. Thanks in advance for any
assistance. |