Date Range

J

jojo1uf

Hi,

I have 2 fields: Effective Date (xx/xx/xxxx) and Expiration Date
(xx/xx/xxxx). I want to prompt the user for the effective date and the
expiration date. I want all the records that fall within that specified
range.

*Also, I want another query to search a date field (xx/xx/xxxx) for the year
(ie. 2004, 2005) only.

Your expertise is greatly appreciated.
 
J

Jeff

jojo1uf said:
Hi,

I have 2 fields: Effective Date (xx/xx/xxxx) and Expiration Date
(xx/xx/xxxx). I want to prompt the user for the effective date and the
expiration date. I want all the records that fall within that specified
range.

*Also, I want another query to search a date field (xx/xx/xxxx) for the year
(ie. 2004, 2005) only.

Your expertise is greatly appreciated.

Hi

In Design mode you can put this code in 'Criteria' row for the searched
field. Lets say your dates are in a field called 'date'. In the row for
'date' and the line 'criteria' put the code.

If Start_date and End_date are not already fields, the user will be
prompted to input the information when they try to open the querry.

BETWEEN[Start_date] AND [End_date]

As for the querry to find records for a part date:

If you want to find the payments made in 2005, for example, put this
code in the 'criteria' row for the date field. 'mydate' is not the name
of any other field so the user will be prompted to input a number "2005"
when the querry is opened.

Year([Date of Payement])=[mydate]

Hope this helps

Jeff
 
Top