Default Date

  • Thread starter Thread starter Grant
  • Start date Start date
G

Grant

I have a form where I want a textbox to have the default
date of the January 1, of the current year, and I have
another textbox where I want the default of the last day
of the current month in current year. I feel that I tried
everything only b/c the textbox is formated to Short Date.
Does anyone have any solutions?
Thanks in advance for your kindness.
 
Grant said:
I have a form where I want a textbox to have the default
date of the January 1, of the current year, and I have
another textbox where I want the default of the last day
of the current month in current year. I feel that I tried
everything only b/c the textbox is formated to Short Date.
Does anyone have any solutions?
Thanks in advance for your kindness.

In the Control's Default property:

For the first day of the year...
=DateSerial(Year(Date()),1,1)

For the last day of the current month:
=DateSerial(Year(Date()),Month(Date())+1,0)

The Formatting of the date is irrelevent.
 
Hey Fred,
You the man, Thanks for your help.
-----Original Message-----


In the Control's Default property:

For the first day of the year...
=DateSerial(Year(Date()),1,1)

For the last day of the current month:
=DateSerial(Year(Date()),Month(Date())+1,0)

The Formatting of the date is irrelevent.
--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.
.
 
Back
Top