Opening a form and filtering by date

mtairhead

Registered User.
Local time
Today, 16:14
Joined
Oct 17, 2003
Messages
138
I am attempting to use a filter when I open a form. Would anyone be able to tell me the correct syntax?

DoCmd.OpenForm "FRMNewLoan", acNormal, , "Date is between 8/4/2005 and 11/15/2005"

"Date is between...." is what I'm using....

I want to pull all records between those two dates.

Thanks,

Andrew
 
Dates require a # delimiter and no "Is", therefor your filter should be

"Date between #8/4/2005# and #11/15/2005#"
 
try:
Date>=#8/4/2005# AND Date <= #11/15/2005#
That, of course gives dates including 8/4 and 11/15...
 
It would be better to use a cal control so you can select whatever dates you want than to hard code fixed dates
 

Users who are viewing this thread

Back
Top Bottom