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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Query Question - Date Range

Status
Not open for further replies.

OBarry

Programmer
Nov 14, 2000
16
US
Can anyone tell me what criteria I can use in a select query to specify the date range as Today's Date plus Thirty days?

Thanks for anyone's help or advice in advance!
 
There may be other ways to do this but this works for me.
Put this in your queries Criteria in its Date field
Between Today1() And Plus30()

Add these two functions to a module
----------------------------
Public Function Plus30()
Plus30 = DateSerial(Year(Now), Month(Now), Day(Now) + 30)
End Function
---------------------
Public Function Today1()
Today1 = Format(Now, "mm/dd/yy")
End Function
------------------------

I just checked it out and it works great.
;-)

DougP, MCP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.
 
How about:

Between Format(Now(), "Short Date") and DateAdd("d", 30, Format(Now(), "Short Date")

Just to avoid the function call.



MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Thanks for your response, both work great but I ended up using...

Between Date() And DateAdd("d",30,Date())

accidently ran across this in the Access help file when I was looking for help for something else.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top