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.
 
Back
Top