jstroh
09-28-2001, 07:39 AM
I am creating a Human Resource database and I want to enter an employee number into the workers comp form. Then the information from the employee table will be automatically entered into the injury log table. Is this even possible?
You would only store the employee number in the injury log which would also be the foreign key in the log table. The rest of the employee data can be retrieved via a query or displayed on unbound text boxes on your log form.
HTH
jstroh
09-28-2001, 08:09 AM
That makes sense, and is what I figured I would have to do.
Thank you.
jstroh
09-28-2001, 08:53 AM
Now when I try to run a query to gather info from the Injury Log, Personnel Information and Account Information, it keeps giving me a join error. What am I doing wrong?
jstroh
09-28-2001, 09:10 AM
How can I keep from getting the Join Expression error?
Pat Hartman
09-28-2001, 02:16 PM
Post the SQL. There is something wrong with it.
jstroh
09-28-2001, 02:30 PM
Here is the SQL
SELECT [Injury Log].Site, [Injury Log].Name, [Injury Log].DateOfIncident, Sites.JobNumber, Sites.Address, [Personnel Information].[Employee#]
FROM (Sites INNER JOIN [Personnel Information] ON Sites.JobNumber = [Personnel Information].JobNumber) INNER JOIN [Injury Log] ON Sites.AccountName = [Injury Log].Site;
I think I figured it out. In the Injury Log table name is 1 field and in Personnel Information table I have LastName and FirstName.
I think this is my problem. Do you concur?