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

YTD Info

Status
Not open for further replies.

RLA

Instructor
Feb 22, 2002
22
US
Hi,
Can someone please help me with a function to find year-to date info? I've been using a hard-coded date w/ Date(), i.e. in a query or report saying 'return info from Between #1/1/03# And Date()'. However, I would like to avoid hard coding if possible. I think it is reasonably simple code, but it's taking me forever to figure it out. Please help, thanks very much!
 
Try something like this:
Code:
.....Between "1/1/" & Format(Date(),"yy") And Date()
It hardcodes the 1/1 date as the beginning of the year, and appends the current year to that 1/1 date.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top