Mismatch data in criteria expression

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

Guest

I get an error stating Data mismatch in the criteria expression when I run
this query, but I'm not sure why. I use this exact same syntax at another
point in my criteria and it works fine. I'm just kind of playing with writing
my queries in SQL, so my form may be really bad, but I still think it should
work.

Please let me know if it is obvious why this works one place but not another
in the same SQL statement.

Here is the offending criteria:

((CDate([ap_mm]+"/"+[ap_dd]+"/"+[ap_yy]))>=#1/1/2004#)

Thanks,

Ted
 
Try:

((CDate([ap_mm]&"/"&[ap_dd]&"/"&[ap_yy]))>=#1/1/2004#)

If that doesn't work, you will need to tell us the Data Type of [ap_mm],
[ap_dd] and [ap_yy] as well as the Field which is compared with the above
expression.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top