Single table query - no results

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

Guest

I am trying to run a query based on a single table, although the field that
I'm trying to extract with criteria is linked to another table. I can sort by
adding criteria to any field except the one I want to. When I add criteria to
the field I want to extract, I get no results. I also have a form linked to
the same table, and if I try to filter by the same field, I get the error
message "Type mismatch in JOIN expression". I've checked that the data types
are the same in the tables.
 
I am trying to run a query based on a single table, although the field that
I'm trying to extract with criteria is linked to another table. I can sort by
adding criteria to any field except the one I want to. When I add criteria to
the field I want to extract, I get no results. I also have a form linked to
the same table, and if I try to filter by the same field, I get the error
message "Type mismatch in JOIN expression". I've checked that the data types
are the same in the tables.

If you're getting this error... it means you have a type mismatch in
the JOIN expression.

Might one of the fields you're joining be a Lookup field? If so, the
data you SEE is not the data that is actually stored.

If not, please post the SQL of the query. You can see it; we cannot.
It's impossible to diagnose what's wrong without being able to see it!

John W. Vinson[MVP]
 
It looks like there was a problem with the lookup connection set up by the
lookup wizard - if I did a query criteria for the ID number rather than the
'team' name it gave me the correct data, but I couldn't work out how to make
it so that the team name could be selected. I've started from scratch and
done it all again and it seems to be working. Hopefully replication won't
stuff it all up. Thanks for your feedback.
 
It looks like there was a problem with the lookup connection set up by the
lookup wizard - if I did a query criteria for the ID number rather than the
'team' name it gave me the correct data, but I couldn't work out how to make
it so that the team name could be selected. I've started from scratch and
done it all again and it seems to be working. Hopefully replication won't
stuff it all up. Thanks for your feedback.

This is one of the MANY problems with Microsoft's misdesigned,
misleading, and all but useless Lookup Wizard: see

http://www.mvps.org/access/lookupfields.htm

for a critique.

You're right - the table DOES contain the ID number. That simple fact
is hidden from your view by the Lookup field. You can create a query
joining your main table to the lookup table, and put a criterion on
the text field in that query; you can't, using the stupid wizard!

John W. Vinson[MVP]
 
I saw that reply coming from 1,610.1 miles (per MS Streets and Trips 2005)
away.

LOL!

I know. I'm getting boring and predictable in my dotage...


John W. Vinson[MVP]
 
Back
Top