Type Mismatch on Update Query

  • Thread starter Thread starter Kathy MacAthur
  • Start date Start date
K

Kathy MacAthur

Hope someone can help...

I have set-up an update query and keep receiving an error response "Type
Mismatch in expression".

I am trying link two tables by an order number field (using update query).
These fields have different field names but my understanding is that this
should not present a problem in linking the two tables. I believe the data
itself seems to be the problem. The one table (table I wish to update) has
an autonumber generating the order number - the other table contains a seven
digit order number (same number just imported differently - which we have no
control over).

Fiddled with this for a day and can't quite get to the bottom of this.

Thanks,

Kathy
 
Kathy,

In order to link the two fields they need to be compatible
data types. To link to an autonumber the other field will
have to be a LongInteger numeric data type. Check to see
what it actually is.

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
My guess is that when you "link" 2 Tables, you use a JOIN clause in the
Query. When you use JOINS, the joining Fields must be of the same data
type, except that AutoNumber is considered as Long. Thus, you need to
ensure that the SevenDigitOrderNumber is of Long type so that it matches to
the AutoNumber in the first Table.

If it is of Text Type but only contains digits, you may like to try
converting it to Long in the JOIN clause like:

....
FROM Table1
INNER JOIN Table2
ON Table1.AutoNumberField = CLng(Table2.SevenDigitOrderNumber)
....
 
Back
Top