Getting Correct Dates

W

williamr

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!!
 
K

KARL DEWEY

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!!
 
S

Steve Schapel

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top