Runtime error 3075

Motion

Registered User.
Local time
Tomorrow, 04:45
Joined
Oct 30, 2007
Messages
11
Hey

I am really stuck on this one:

?DCount("[HolidayID]", "tblHolidays", "[HolidayDate] BETWEEN #" & Format(dteTheDate2, "mm/dd/yyyy") & "# AND #10/31/2007#")

dteTheDate2 is a variable.

Has anybody got any ideas?

Thanks in advance.

Richard
 
Try this:
Code:
dteTheDate2 = Format(dteTheDate2,"mm/dd/yyyy")

DCount("[HolidayID]", "tblHolidays", "[HolidayDate] BETWEEN #" & dteTheDate2 & "# AND #10/31/2007#")

Also, make sure your [HolidayDate] field is short date and doesn't include time.
 
Thanks for that Bob, problem solved.
 

Users who are viewing this thread

Back
Top Bottom