Getting Correct Dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using a filter in a report that I want to filter the name, start date and
stop date. The filtering of the name seems to work with
([Name]=[Forms]![frmTimeReport]![txtFilterName]) but I don't know how to say
+ >=this date and <= that date.

Thank You in Advance!!
 
In the query use ---
WHERE ([Name]=[Forms]![frmTimeReport]![txtFilterName]) AND YourDateField
=[this date] AND YourDateField <= [that date]

--
KARL DEWEY
Build a little - Test a little


williamr said:
I'm using a filter in a report that I want to filter the name, start date and
stop date. The filtering of the name seems to work with
([Name]=[Forms]![frmTimeReport]![txtFilterName]) but I don't know how to say
+ >=this date and <= that date.

Thank You in Advance!!
 
William,

I agree with Karl's suggestion. An alternative way of doing it would be:
[Name]=[Forms]![frmTimeReport]![txtFilterName] AND ([YourDateField]
Between [Forms]![frmTimeReport]![DateFrom] And
[Forms]![frmTimeReport]![DateTo])

Please note also that 'name' is a Reserved Word (i.e. has a special
meaning) in Access, and as such should not be used as the name of a
field or control or database object.

--
Steve Schapel, Microsoft Access MVP

KARL said:
In the query use ---
WHERE ([Name]=[Forms]![frmTimeReport]![txtFilterName]) AND YourDateField
=[this date] AND YourDateField <= [that date]
 
Back
Top