I am having issues building and defining relationships between four tables (see below) that track batches of items through a receiving and completion process. Any number of users may complete a batch, which creates a one - many relationship between the receiving and completion tables. Each batch is tracked via a batch id field (autonumber as primary key) established in the receiving record table. When a user records completion information for all or part of a batch, they may also need to select one or more other teams/depts that other parts of the batch must be sent to. I am trying to deal with this by adding two additional tables; one that has a list of the teams/depts that pieces may be sent to, and another table that uses a completion id (in common with field in completion table because it's a subset of information) to track which completion records have items sent out and where. Does this table structure seem sound and, if so, I need help with building a query on it that will include all completion records whether corresponding records exist in the "out to" table or not. As it is, my query isn't working, but one thing at a time. Here is a brief overview of the four tables and their linking fields:
tbl_Receiving_Record:
Rec_batch_id (autonumber identifier for each batch)
tbl_Completion_Record:
Rec_batch_id (linked to Receiving Record)
Comp_id ("Comp" = Completion. Autonumber identifier for each completion record)
tbl_Outto_Record:
Completion_id (linked to Completion Record)
Outto_id (Number field linked with autonumber in tbl_outto table below)
tbl_Outto:
Outto_id (autonumber id)
Outto description (text description of team/dept)
Here is my basic SQL for the table relationships:
SELECT
FROM tbl_Receiving_Record INNER JOIN (tbl_completion_record INNER JOIN (tbl_Outto RIGHT JOIN tbl_Outto_Record ON tbl_Outtutto_id = tbl_Outto_Record.Outto_id) ON tbl_completion_record.Comp_id = tbl_Outto_Record.Comp_id) ON tbl_Receiving_Record.rec_batch_id = tbl_completion_record.rec_batch_id;
Thanks for any help you can give!