How do I link tables, or queries

M

Miked

I need to link tables, or queries so that an existing table which contains
names, and address information can be linked to another table where
information about that employee is entered. This way the information on the
second table is linked to the appropriate person's name. When I add a person
on the first address table, I want them to appear on the second data entry
table.
 
R

Rick B

You would link them by adding a common field (EmployeeNumber maybe?) and
then create a relationship between the two.

You would not do as you say in the last sentence and have the data appear in
the second table. You would have the data appear in forms, queries, or
reports by including both tables.

This is the very point of a relational database. If you need more details,
open any of the templates that comes with Access, or open the sample
"Northwinds" database and look at how they relate employees, or customers,
or contacts.

Rick B
 
J

John Vinson

I need to link tables, or queries so that an existing table which contains
names, and address information can be linked to another table where
information about that employee is entered. This way the information on the
second table is linked to the appropriate person's name. When I add a person
on the first address table, I want them to appear on the second data entry
table.

As Rick says, you DO NOT want to copy the person's name and address
from the first table into the second table. A relational database uses
the "Grandmother's Pantry Principle": "a place - ONE place! - for
everything, everything in its place".

Your first table should have a unique EmployeeID (names are NOT a good
link, because two people might have the same name); your second table
would have a (non-unique) EmployeeID field as a link.

For data entry you could use a Form based on the Employees table, and
a Subform based on the related table. You should NOT use table
datasheets for data entry - they're much too limited!

For reporting purposes, you can create a Query joining the two tables;
base your report on this Query, and pull the name information from the
employee table and the related information from the other table.

John W. Vinson[MVP]
 

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