From: Irshad Alam on
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

From: Tom van Stiphout on
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


"Irshad Alam" wrote:

> 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
>
From: Douglas J. Steele on
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)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Tom van Stiphout" <TomvanStiphout(a)discussions.microsoft.com> wrote in
message news:E7D3B958-0F7F-4CD7-A5F3-B23771FFEEFC(a)microsoft.com...
> 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
>
>
> "Irshad Alam" wrote:
>
>> 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
>>

From: Tom van Stiphout on
On Sun, 18 Apr 2010 06:58:27 -0400, "Douglas J. Steele"
<NOSPAM_djsteele(a)NOSPAM_gmail.com> wrote:

You gave him a fish!

-Tom.
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)