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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ah sorry got it working had the rowselect incorect.
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
>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
ASKER
Thanks I've started another thread as new issues came up. 26988400 (Which looks like you jumped on too) :)
ASKER
I tires this but after update the zip code the city text box remains null.