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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you use an index to create a join between tables? 1

Status
Not open for further replies.

IanGlinka

IS-IT--Management
Feb 28, 2002
215
US
I have a few tables whose primary keys consist of 2 or more fields joined together in an index. I need to join these tables either in the relationships window or in a query, but it seems access only lets you join single fields. Isn't there a way to join by indexes? I thought when you made an index like that, it creates a kind of logical field that is obviously used to check for uniqueness. Can that logical field also be used to create joins between tables?

Thanks
Ian
 
Here's a snapshot of what I'm talking about:

indexjoin.jpg
 
Hi yes you can join on 'compound' fields you just drag two (or more) join lines between the tables, joining the relevant columns Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Oh, so I would join ADMITTING_NUM to ADMITTING_NUM, RECORD_TYPE to RECORD_TYPE, etc...?

I'll give that a shot, but I'm not sure if .. I guess I'm just a bit skeptical. Seems like that would only ... hmm... this is going to rack my brain, I'm just going to try it. It just seems to me, how would Access know which fields I were trying to group together? Here goes nothing:

indexjoin2.jpg
 
Hi

Thats it exactly

To convince yourself look at the SQL view! Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top