Link to home
Start Free TrialLog in
Avatar of thandel
thandel

asked on

Update a field based on another value entered on a form

I have a form where the user enters a customer's name and address.... all that goes into one table: tPatient

I also have another table (tZip) that contains two fields, zip and city.

I would like to set the main form so when the user enters the zip the City will automatcially update correctly on the form based on the users entered zip code for a particular customer.

How can this be done via VBA?

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of dqmq
dqmq
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thandel
thandel

ASKER

Thanks, when you say set the properities is that for the combo box and just leave the text box alone?

I tires this but after update the zip code the city text box remains null.
Avatar of thandel

ASKER

Ah sorry got it working had the rowselect incorect.
Avatar of thandel

ASKER

Thanks!  Can't really go the other way as some cityies have more than one zip code.
I believe my solution had a typo:  bound column should = 1, not 0

>Can't really go the other way as some cityies have more than one zip code.

Not a problem...show both the city and the zip in the dropdown.  User can pick from among them:

RowSource:  Select city, zip from yourtable
Column Count = 2
Bound Column = 1




Avatar of thandel

ASKER

Thanks I've started another thread as new issues came up. 26988400  (Which looks like you jumped on too)  :)