First date and last date of the current month

  • Thread starter Thread starter Irshad Alam
  • Start date Start date
I

Irshad Alam

Please advice code, which I want to use on click event of a button of a FormSPL

Me.Text13 = First date of the current month
Me.Text16 = Last date of the current month

Thanks and best regards

Irshad
 
First Date: Check out the DateSerial function in the help file, Combined with
Year(Date) and Month(Date) it should do the trick.
Last Date: From the First Date, go forward 1 month, then go back 1 day. Use
the DateAdd function for this.

-Tom van Stiphout
Microsoft Access MVP
 
Just to be a little more explicit than Tom <g>

First day of the current month:
DateSerial(Year(Date), Month(Date), 1)

Last day of the current month:
DateSerial(Year(Date), Month(Date) + 1, 0)
 
On Sun, 18 Apr 2010 06:58:27 -0400, "Douglas J. Steele"

You gave him a fish!

-Tom.
Microsoft Access MVP
 
Back
Top