Error #3464. Data Type Mismatch in Criteria Expression..

Rizzocow

New member
Local time
Today, 18:59
Joined
May 10, 2013
Messages
3
:banghead:
Can anyone see anything that might be amiss in this code? My eyeballs hurt from staring at it over...and over...and over...!
Thanks in advance for any input you may have.

SELECT ORDERS.CUSTCODE, ORDERDET.DUEDATE, ORDERDET.JOBNO, ORDERDET.MASTERJOBNO, ORDERS.ORDERNO, ORDERDET.PARTNO, ORDERDET.QTYORDERED, ORDERDET.STATUS, ORDERDET.UNITPRICE, (ORDERDET.QTYORDERED * ORDERDET.UNITPRICE) AS TotalCost, ORDERDET.WORKCODE FROM ORDERS INNER JOIN ORDERDET ON ORDERS.ORDERNO = ORDERDET.ORDERNO WHERE (ORDERDET.DUEDATE = "REWORK") AND (ORDERDET.DUEDATE >= "01/01/13") ORDER BY ORDERS.ORDERNO ;
 
My initial guess is this part:

(ORDERDET.DUEDATE >= "01/01/13")

In Access you need Octothorpes (#) instead of quotes on dates:

(ORDERDET.DUEDATE >= #01/01/13#)
 
Thanks for the reply boblarson.
The Octothorpes didn't seem to make a difference. I agree tht it seems like there is a issue with the date but I can't figure out what it is.
Thanks again.
 
Thanks for the reply boblarson.
The Octothorpes didn't seem to make a difference. I agree tht it seems like there is a issue with the date but I can't figure out what it is.
Thanks again.
Well, upon closer examination, it looks like you are trying to compare a date with 'REWORK'

ORDERNO = ORDERDET.ORDERNO WHERE (ORDERDET.DUEDATE = "REWORK") AND (ORDERDET.DUEDATE >= "01/01/13") ORDER BY ORDERS.ORDERNO ;
 

Users who are viewing this thread

Back
Top Bottom