Hello:
I have an access database that stores employee timings by date.
At the same time, I have a form that queries this database.
On the form I use a DTpicker to enable a user input the date for which
he/she wants data
When I execute the query below in my VB code, I get a run time error
that says
Error ===> "Datatype mismatch in criteria expression."
Query ===> cmdQuery.CommandText = "SELECT * from tblTimings WHERE
fldDate = '" & dtpDate.Value & "'"
I don't understand why I get this error when
both, the field fldDate is of type Date/time and dtpDate.Value returns
the same. I tried setting both the DB date and the control date to
different date formats such as short date, long/general date, custom
date, but I still get the same error.
Appreciate any help on resolving this