Comparing A date to a date

StevenAFC

New member
Local time
Today, 10:12
Joined
Jul 7, 2008
Messages
8
Hi,

In my database set up I have a field called start date which is a shortdate datatype.

When I compare the information from a date picker I get a data type mismatch error.

Could you help?

PHP:
Set rs = CurrentDb.OpenRecordset("SELECT ID, startDate, endDate FROM tblLeave WHERE startDate > '" & dpkEndDate & "'")


dpkEndDate being the datepicker.
 
Your problem is in using ' around your date. Quotes are for strings.

Use # for dates.... That should resolve your issue(s)
 
Thanks a lot!

Did not know about #!
 

Users who are viewing this thread

Back
Top Bottom