T
Trotsky
Hi All,
I have a calendar (Calendar Control 11) on my form to enable users to
click on a date to enter it into a Text Box called startDate. The
calendar is made visible by clicking on a command button (command18).
The trouble is it always returns the year as 2005 no matter what I click
on.
I use this code to call the calendar:
Private Sub Command18_Click()
Calendar1.Visible = True
Calendar1.SetFocus
If Not IsNull(startdate) Then
Calendar1.Value = startdate.Value
Else
Calendar1.Value = Date
End If
End Sub
And when users click on a date this code sends it to the text box
Private Sub Calendar1_Click()
startdate.Value = Calendar1.Value
startdate.SetFocus
Calendar1.Visible = False
End Sub
The text box then passes the date to a query via
=Forms!Breakthrutimeperclient.Requery
Can anyone see where I've went wrong?
I use Access 2003 on XP
TIA
John
I have a calendar (Calendar Control 11) on my form to enable users to
click on a date to enter it into a Text Box called startDate. The
calendar is made visible by clicking on a command button (command18).
The trouble is it always returns the year as 2005 no matter what I click
on.
I use this code to call the calendar:
Private Sub Command18_Click()
Calendar1.Visible = True
Calendar1.SetFocus
If Not IsNull(startdate) Then
Calendar1.Value = startdate.Value
Else
Calendar1.Value = Date
End If
End Sub
And when users click on a date this code sends it to the text box
Private Sub Calendar1_Click()
startdate.Value = Calendar1.Value
startdate.SetFocus
Calendar1.Visible = False
End Sub
The text box then passes the date to a query via
=Forms!Breakthrutimeperclient.Requery
Can anyone see where I've went wrong?
I use Access 2003 on XP
TIA
John