Data type mismatch in criteria expression on Access query

Asatoma Sadgamaya
Asatoma Sadgamaya used Ask the Experts™

I get "Data type mismatch in criteria expression" error message when I run below function.

Date Completed: CDate([QryReportDetail].[Date Completed]).

I can't find anything wrong in the column(Actual there the values are null for this column, still I need to apply this function in case it get values in the future). Also, this function worked fine with other columns with character dates.

Please have a look.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2015
Distinguished Expert 2018

If it is a Date field, no CDate is needed:

Date Completed: [QryReportDetail].[Date Completed]

Open in new window

And it can be Null as well.
TngDueDate: IIf(Not IsDate([TngDue]),Null,CDate([TngDue]))


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial