What am I doing wrong?

jstroh

Registered User.
Local time
Today, 03:31
Joined
Aug 29, 2001
Messages
15
In my personnel data base I want to run a report based on the completed levels of training. I have 2 tables. 1 has all the employee information including the Job number. The other table has the Job information. I want the query to show all the training information including the job number, then I want the query to get the corresponding Account Name that is assigned from the job number. When I set it up in the query design view I open both tables and select the fields I want. Then I try to run the query and it gives me a "Type mismatch in JOIN expression" error message. This has happened a few times for other queries and reports that I want to run and I can't figure out why I keep getting this message. Can anyone help?

The JobNumber and AccountName correspond.
Here is the SQL:

SELECT [Personnel Information].JobNumber, [Account Information].AccountName, [Personnel Information].[Employee#], [Personnel Information].EmployeeLast, [Personnel Information].Level2, [Personnel Information].Level3, [Personnel Information].Status
FROM [Account Information] INNER JOIN [Personnel Information] ON [Account Information].JobNumber = [Personnel Information].JobNumber
WHERE ((([Personnel Information].Status)="Active"));
 
Make sure the field types for the joined fields are the same.
 
In reading my SQL up above they look the same to me. Can you find a discrepency?
 
Beware
The field TYPE is not the field NAME.
It would seem that the field JobNumber in your table Account Information is not of the same (or compatible) type than the field JobNumber in your table Personnel Information. Check the types of these field in table design view.

Alex

[This message has been edited by Alexandre (edited 10-03-2001).]
 
That was it, thank you. All my problems from that is fixed.
 

Users who are viewing this thread

Back
Top Bottom