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

Where do you set the Calendar control to date-1

Status
Not open for further replies.

colezpapa

Programmer
Feb 26, 2007
86
US
I am using a calendar control on one of my forms.
It defaults to the current date...however in this application I would like it to default to date-1....
But I am not sure where to set it, as it always displays current date....
Any ideas.
 
In the forms load event, put the following:

Me.Calendar1.Value = Now() - 1


this will set the calendar's value to today's date - 1 day
 
Thanks for the info...but it did not work.
I am using the control MSCAL.Calendar.7

It still begins on current date..
 
Did you make sure to change the name of Calendar1 to the same that you named your calendar?
Also, make sure that in the properties for the calendar control that you delete the data in the value property.
 
Try
Me![Calendar1] = Now() - 1
Replace Calendar1 with your calendar name
 
I'll try it this morning. True, I did not delete the value in the property sheet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top