Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access table relationship linking

Status
Not open for further replies.

Freefall27

Technical User
Sep 8, 2005
65
0
0
US
I have 2 tables that need to be linked in Access 2000 and having some challenges. I need to link these and show all info on one line

Table A (Two fields A & Z)
ID SPC A = 12120
ID SPC Z = 10541

Link both fields above (ID SPC A) & (ID SPC Z) to (LOC ID) field below and show location.

Table B
LOCATION ID LOCATION
12120 = BLHG10R
10541 = BLHR83P


Desired Output:

ID SPC A ID SPC Z A LOCATION Z LOCATION
12120 10541 BLHG10R BLHR83P

A LOCATION and Z LOCATION are not actual fields just put on to show what I want it to look like.

TABLE A TABLE B
LOCATION ID A
LOCATION ID Z LOCATION ID

 
Seems you're new to Access.
You may want to read:
Fundamentals of Relational Database Design
and other books on table design.

Be careful when you post your question. You mention Table A but give no field names. And you say "(Two fields A & Z)". I hope you mean two pieces of data, not fields. Then you have = signs in your table examples. All very confusing.
I'm not sure of your table structures, so:
So, and I'm guessing, you have:
TableA
EmployeeID LocationID
IDSPCA 12120
IDSPCZ 10541

TableB
LocationID LocationName
12120 BLHG1OR
10541 BLHR83P

If the fieldnames are spelled the same in both tables for LocationID, then when you create a query they should be connected. When you run the query, you'll get
IDSPCA 12120 BLHG1OR
IDSPCz 10541 BLHR83P

Then you can use:
How to concatenate multiple child records into a single value
faq701-4233

To place them one one line. But again, it wasn't explained well.
 
Freefall27 . . .

For a more indepth look, have a peak at these:

Fundamentals of Relational Database Design

Normalizing Tables

Table Relationships

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top