Autofilling a form from a seperate table

jstroh

Registered User.
Local time
Today, 05:30
Joined
Aug 29, 2001
Messages
15
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
 
That makes sense, and is what I figured I would have to do.

Thank you.
 
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?
 
How can I keep from getting the Join Expression error?
 
Post the SQL. There is something wrong with it.
 
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?
 

Users who are viewing this thread

Back
Top Bottom