Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateSerial range prompt 1

Status
Not open for further replies.

trustsun

Technical User
Feb 4, 2004
73
US
I currently use this date serial paremeter to filter by months. The user will select a month like 1-12. But now I can't see anything if I choose a month. Is it because it's a new year? If so how could I modify this to still see last years data and maybe this years data.

Between DateSerial(Year(Date()),[Select Month (1 - 12)],5) And DateSerial(Year(Date()),[Select Month (1 - 12)]+1,5)

Thanks
 
I knew that, but I need to see data up to 2005-01-05 as December when I enter 12 for December 04. Sometimes the data starts on the 31st and ends no later than the 5th the following month.


thanks

 
You need to allow specification of both month and year as in
Code:
Between DateSerial([Select Start Year], [Select Month (1 - 12)],5)
    And DateSerial([Select Start Year], [Select Month (1 - 12)]+1,5)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top