Look Ups

  • Thread starter Thread starter Kate
  • Start date Start date
K

Kate

Does anyone have suggestions for an alternative to using
the look-up wizard...I am not having a problem with using
the look-up but when I go to run a query with this field I
receive "Type Mismatch in JOIN Expression!"
Any clues would be much appreciated...Thanks a bunch!
 
Kate

A guess, but I have a hunch you are referring to the lookup wizard in TABLE
definition. A search through the tablesdbdesign 'group will show a strong
consensus against using it.

You've (re-)discovered one of the reasons against ... the value that is
displayed in the table is a "looked up" value, but that is NOT what is
stored in the table. So when you try to do a join in your query, the odds
are good you'll have a type mismatch.

To overcome the immediate issue, try joining the "lookup" field in your
primary table with the "key" (i.e., NOT the display) field in your lookup
table. (and it gets more complex/confusing if you are using criteria on this
field!)

The downside is that you will ALWAYS have to remember to do this
"cross-wiring", as will anyone else who ever tries to use your database.

The solution is to convert the datatype of the lookup field in your primary
table to match that of the key field in the lookup table. For example, if
your lookup table uses an Autonumber as a key, your primary table will need
to have a LongInt type as its Foreign Key to match up.

Good luck!

Jeff Boyce
<Access MVP>
 
Jeff...thanks for the insight - I had gathered bits and
pieces of that information and now I have that cleared up -
yippee! But one more question - if you have any
thoughts...When I set up the query I am able to run it but
I am NOT able to set "criteria" - are there any solutions
for this or should I simply use filters?
Thanks so much!
 
Back
Top