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!

Join Multiple Tables in MS Access 2

Status
Not open for further replies.

SoccerLax149

Technical User
Dec 11, 2002
2
US
I have 4 tables that I need to join in a query. The tables have data like this:
TimeClock -> ClockID (PK), SiteID, WorkerID, TypeID, Start, Finish
Sites -> SiteID (PK), Name
Worker -> WorkerID (PK), Name
WorkType -> TypeID (PK), Type

I need a query that will take all the data from the TimeClock table, and where it says the SiteID, I need it to read that ID from Sites.SiteID and output the Sites.Name field. I need the same thing for the TimeClock.WorkerID field with the Worker.WorkerID field and the TimeClock.TypeID with the WorkType.TypeID field.

I've set up the correct relationships in Access, but when I try to query them, it tells me I have a type mismatch. Please tell me what I need to do to get this to work.

Thanks a lot
Scott Menzer
 
Here's a picture of my relationships and the tables with their content fields that I have setup. If these are not correct or could be improved, let me know.

Relationships.jpg
Scott Menzer
Venture Web Concepts
 
type mismatch usually means you are using the wrong data type, make sure the types you are linking your primary keys to are long interger, but i think a better solution would be to use the secondary tables as look up tables for the info you want to link and enter it directly to the time clock table then the records will be maintained. i'm still a newbie tho so maybe i'm completely wrong. good luck
 
Does it tell you where the type mismatch is??
Are your siteid fields both the same datatype?

Transcend
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top