Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Union Query: Data type mismatch in criteria expression

Status
Not open for further replies.

striker73

MIS
Jun 7, 2001
376
US
I am having issues with a union query of mine. I have a table that tracks certain tests. I have created two different queries (ie: one is all the tests that need a draft test sent, one is all the tests that need a final test sent), basically each query has the same exact fields.

I am trying to union these two queries together and just list the next due date (either draft or final). My query is as follows:


SELECT *, Draft as [Next Due Date] FROM qryTest_Draft

UNION

SELECT *, Final as [Next Due Date] FROM qryTest_Final


I am getting the "Data type mismatch in criteria expression" error message. I can run both queries separately and they come up just fine. Can someone help me out? Thanks!
 
You don't need the "as [Next Due Date]" in the second part of the query. Do both queries have exactly the same fields and data types? Are there any criteria in the two source queries?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
and you may need to put DRAFT and FINAL in quotes

Leslie
 
lespaul,
Good catch.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top