How can I auto fill fields based on another fields data?

I am creating a database that will be used as a company contact list.  I am going to be using the following tables and fields:

Table: Contact
1.  ID
2.  Last Name
3.  First Name
4.  Phone Number
5.  Extension
6.  Email
7.  Branch

Table: Branch
1.  Branch
2.  Phone Number

I would like to use field7(Branch) as a lookup into Table: Branch and  would like field4(Phone Number) to auto fill with field2(Phone Number) from Table: Branch.

Thanks in advance for any help.
datalink944Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jorge PaulinoIT Pro/DeveloperCommented:
Add a combobox and follow the wizard. You can select the branch and insert the phone number in the appropriated field (contact table)
0
jefftwilleyCommented:
You can't do this at the table level. You can use the LookUp tab in the Table design screen to provide a list of values that are possible from the other table. But in order to default, wouldn't you need criteria to say that if branch = branch then  put this value in my field, else do something else?

You can of course use an on_load event on a form to populate a field based on that logic, but you didn't mention a form.

??
J
0
ldunscombeCommented:
Theroetically in a normalised database you shouldn't need to.  I would suggest a slightly different structure as follows with a one-to-many relationship between the two tables on Branch_ID.

Table: Contact
1.  Contact_ID <Key Index No Duplicates>
2.  Branch_ID   <Index Allow Duplicates>
3.  Last_Name
4.  First_Name
5.  Phone_Number
6.  Extension
7.  Email


Table: Branch
1.  Branch_ID <Key Index No Duplicates>
2.  Branch
3.  Phone_Number

Leigh
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.