I have a form in my application named "frmWorkHistoryDetails", and it is opened when viewing an employee's information in "frmEmployeeInfo" and clicking on a "Details" button in subform "sfrmWorkHistoryList". The form "frmWorkHistoryDetails" needs to know what record to find in a query based upon the EmployeeID and ShopID, which are both stored in seperate tables (tblEmployees and tblShops).
Here is what the query, "qryWorkHistoryDetail" looks like:
And here is a picture of the form "frmEmployeeInfo"...
Here is what the query, "qryWorkHistoryDetail" looks like:
Code:
SELECT tblWorkHistory.*, tblEmployees.SSN, tblEmployees.LastName, tblEmployees.FirstName, tblEmployees.MiddleInitial, tblShops.ShopNumber
FROM tblShops INNER JOIN (tblEmployees INNER JOIN tblWorkHistory ON tblEmployees.ID=tblWorkHistory.EmployeeID) ON tblShops.ID=tblWorkHistory.ShopID;
And here is a picture of the form "frmEmployeeInfo"...
