Aug 9, 2001 #1 site Programmer Oct 23, 2001 44 AT Hi, friends, I have a report title: " Summary of 2001 Receipt Transactions July 1, 2001 Thru July 31, 2001 " I want to know how to get "July( currentMonth - 1) and LastDate of this Month. Can help me get it? Many Thanks. Jing
Hi, friends, I have a report title: " Summary of 2001 Receipt Transactions July 1, 2001 Thru July 31, 2001 " I want to know how to get "July( currentMonth - 1) and LastDate of this Month. Can help me get it? Many Thanks. Jing
Aug 9, 2001 #2 JoeMiller IS-IT--Management Apr 27, 2001 1,634 US Try this web page, has FirstOfMonth and LastOfMonth Functions that you can use: http://www.mvps.org/access/datetime/date0007.htm HTH Joe Miller joe.miller@flotech.net Upvote 0 Downvote
Try this web page, has FirstOfMonth and LastOfMonth Functions that you can use: http://www.mvps.org/access/datetime/date0007.htm HTH Joe Miller joe.miller@flotech.net
Aug 9, 2001 #3 MichaelRed Programmer Dec 22, 1999 8,410 US Actually, either is trivial in VBA. Given Some Month within a valid date (e.g. #8/9/2001# | Now) refered to as a FIELD [MyDate]: FirstMonth: DateSerial(Year([MyDate]), Month([MyDate]), 1) LastMonth: DateSerial(Year([MyDate]), Month([MyDate]) + 1, 0) If you want to do it in a module, so the dates are 'consistient': FirstMonth = DateSerial(Year(Now), Month(Now), 1) LastMonth = DateSerial(Year(Now), Month(Now) + 1, 0) MichaelRed mred@att.net There is never time to do it right but there is always time to do it over Upvote 0 Downvote
Actually, either is trivial in VBA. Given Some Month within a valid date (e.g. #8/9/2001# | Now) refered to as a FIELD [MyDate]: FirstMonth: DateSerial(Year([MyDate]), Month([MyDate]), 1) LastMonth: DateSerial(Year([MyDate]), Month([MyDate]) + 1, 0) If you want to do it in a module, so the dates are 'consistient': FirstMonth = DateSerial(Year(Now), Month(Now), 1) LastMonth = DateSerial(Year(Now), Month(Now) + 1, 0) MichaelRed mred@att.net There is never time to do it right but there is always time to do it over