D
David
Hi
I have a form based on a query and on the form I have a button that calls
code to filter between a start date and a end date using:-
Me.Filter = "datevalue(FromQuery.audDate) between CDate([Required Date])
and CDate([End Required Date])"
this worked other than it did not find any 01/02/05 dates if I used 01/02/05
to 03/02/05, I now understand that I need to use the Dateadd function
however when I use it in the "between" and "AND" context it will not work it
just finds more records that the dB had to start with.
When I test the basic bit of code:-
Me.Filter = "datevalue(FromQuery.audDate) = Format(DateAdd('d', -1, [Start
Date]), 'dd\/mm\/yyyy')"
I can see this part find the day based on me adjusting the day count as it
should.
It looks like I do not understand the "between" syntax, could someone help.
Thank you for any help
Dave
I have a form based on a query and on the form I have a button that calls
code to filter between a start date and a end date using:-
Me.Filter = "datevalue(FromQuery.audDate) between CDate([Required Date])
and CDate([End Required Date])"
this worked other than it did not find any 01/02/05 dates if I used 01/02/05
to 03/02/05, I now understand that I need to use the Dateadd function
however when I use it in the "between" and "AND" context it will not work it
just finds more records that the dB had to start with.
When I test the basic bit of code:-
Me.Filter = "datevalue(FromQuery.audDate) = Format(DateAdd('d', -1, [Start
Date]), 'dd\/mm\/yyyy')"
I can see this part find the day based on me adjusting the day count as it
should.
It looks like I do not understand the "between" syntax, could someone help.
Thank you for any help
Dave