Using Access 2003
On a form there is a Calendar control, ocxCal
Here is code behind the Forms OnOpen event
This causes the calendar to display a value of November 8, 2008 when the form opens.
However if I comment out the DoCmd.Maximize line it opens properly to display today's date, in this case January 26, 2009.
The only other code that I can think of that might interfere is the code on the form's OnLoad event:
Any ideas as to what causes this?
Tom
On a form there is a Calendar control, ocxCal
Here is code behind the Forms OnOpen event
Code:
Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize
Me.fraGuests = Null
Me.txtMeetingDate = Null
End Sub
This causes the calendar to display a value of November 8, 2008 when the form opens.
However if I comment out the DoCmd.Maximize line it opens properly to display today's date, in this case January 26, 2009.
The only other code that I can think of that might interfere is the code on the form's OnLoad event:
Code:
Private Sub Form_Load()
On Error GoTo Form_Load_Error
Me!ocxCal.Value = Date
On Error GoTo 0
Exit Sub
Form_Load_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Form_Load of VBA Document Form_frmAttendance"
End Sub
Any ideas as to what causes this?
Tom