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

Calender Control default date 1

Status
Not open for further replies.

JimFlower

Programmer
Jun 21, 2001
42
GB
I have a Calender Control on a form and I want to set the date to the current date from code
 
You can assign the current date to the value of the control using the Date() function in the Form_Load event. For example:

Code:
Private Sub Form_Load()

    cldrDate.Value = Date

End Sub

Hope this helps.

- Glen

Know thy data.
 
I was using the on open event it dosn't work there
 
Dim mycal As Object
Set mycal = Me.DateSelector
mycal.Today
mycal.Refresh
Set mycal = Nothing

Also works from the On Load event
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top