Type Mismatch in Join Expression - A little help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone help me disect the SQL below just a bit to give me a hint where
to look for this error. my understand it means that I am trying to join two
different types of data somewhere along the way.

SELECT DISTINCTROW [Individual Chrono History].INVENTORY, Offenders.FName,
Offenders.LName, [Individual Chrono History].[ID Num], [Individual Chrono
History].[Note Date], [Individual Chrono History].Note
FROM Offenders INNER JOIN [Individual Chrono History] ON Offenders.INVENTORY
= [Individual Chrono History].INVENTORY
WHERE ((([Individual Chrono History].INVENTORY)=[Forms]![Main
Form]![INVENTORY]))
ORDER BY [Individual Chrono History].[ID Num];


As I have said in a previous post, I have inherited some Access management,
and I am having to "learn my way along the way" so to speak. I'm OK with my
own stuff, but only because I don't have to fix something that's broken and
is not beyond my level of database design. But someone else's creations are
driving me buggy.
 
Check the two fields
INVENTORY in table Offenders
INVENTORY in table [Individual Chrono History]

In your query you join this two fields, check if they are the same type
 
Ofer,

So, in my own words, I was using two tables that had the same fiend name in
them. But in one table, the type was different tan the other!!

In the sql, the Inner Join is telling me that I had joined two different
tables in a query and, since the fiends did not match in type for this field
referenced in both tables . . . . the error! Sound about right.

I got past that now, with your help. Thanks

Ofer Cohen said:
Check the two fields
INVENTORY in table Offenders
INVENTORY in table [Individual Chrono History]

In your query you join this two fields, check if they are the same type

--
Good Luck
BS"D


G-Man said:
Can someone help me disect the SQL below just a bit to give me a hint where
to look for this error. my understand it means that I am trying to join two
different types of data somewhere along the way.

SELECT DISTINCTROW [Individual Chrono History].INVENTORY, Offenders.FName,
Offenders.LName, [Individual Chrono History].[ID Num], [Individual Chrono
History].[Note Date], [Individual Chrono History].Note
FROM Offenders INNER JOIN [Individual Chrono History] ON Offenders.INVENTORY
= [Individual Chrono History].INVENTORY
WHERE ((([Individual Chrono History].INVENTORY)=[Forms]![Main
Form]![INVENTORY]))
ORDER BY [Individual Chrono History].[ID Num];


As I have said in a previous post, I have inherited some Access management,
and I am having to "learn my way along the way" so to speak. I'm OK with my
own stuff, but only because I don't have to fix something that's broken and
is not beyond my level of database design. But someone else's creations are
driving me buggy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top