T Tom Ross Jul 15, 2004 #1 an additional question. How do I make a calendar control default to the current date. this has bugged me for some time. Thanks Tom
an additional question. How do I make a calendar control default to the current date. this has bugged me for some time. Thanks Tom
P PC Datasheet Jul 15, 2004 #2 Tom, Put the following code in the OnOpen event of your calendar form: Me!NameOfCalendarControl.Value = Date()
Tom, Put the following code in the OnOpen event of your calendar form: Me!NameOfCalendarControl.Value = Date()
T Tom Ross Jul 16, 2004 #3 Thanks Tried that before and doesnt seem to work I am using two unbound calendar controls on my form txtStartWeek and txtFinishWeek they are of type calendar MSCAL.calendar.7 I have this code in my form open event Private Sub Form_Open(Cancel As Integer) Me.txtStartWeek.Value = Date() Me.txtFinishWeek.Value = Date() End Sub It doesn't work. I tried setting the value parameter in the control properties to Date()--it wouldnt take it or Null--didnt make any difference. What else can I try Tom
Thanks Tried that before and doesnt seem to work I am using two unbound calendar controls on my form txtStartWeek and txtFinishWeek they are of type calendar MSCAL.calendar.7 I have this code in my form open event Private Sub Form_Open(Cancel As Integer) Me.txtStartWeek.Value = Date() Me.txtFinishWeek.Value = Date() End Sub It doesn't work. I tried setting the value parameter in the control properties to Date()--it wouldnt take it or Null--didnt make any difference. What else can I try Tom
J Jeff Conrad Jul 16, 2004 #4 Move the code to the Load event instead of the Open event. The Open event is too soon. If it still does not work try this in the Load event: Private Sub Form_Load() Me.txtStartWeek.Today Me.txtFinishWeek.Today End Sub (Assuming those are the actual names of the calendar controls.)
Move the code to the Load event instead of the Open event. The Open event is too soon. If it still does not work try this in the Load event: Private Sub Form_Load() Me.txtStartWeek.Today Me.txtFinishWeek.Today End Sub (Assuming those are the actual names of the calendar controls.)
T Tom Ross Jul 16, 2004 #5 Jeff the Load Event is where it needed to be. My previous code worked there . Have a nice weekend Tom
Jeff the Load Event is where it needed to be. My previous code worked there . Have a nice weekend Tom