J
JS
I have a calendar control on my form that seems to be
working well. However, when I add a new record the
default date on the calendar is the date I created it
rather than the current date. How do I show the current
date? Would appreciate any suggestions.
Here's my code:
Private Sub cboDate_MouseDown(Button As Integer, Shift As
Integer, X As Single, Y As Single)
With Calendar1
.Visible = Not .Visible
If .Visible Then
.SetFocus
.Value = Date
Else
cboDate.SetFocus
End If
End With
End Sub
__________________________________________
Private Sub Calendar1_Click()
With Calendar1
cboDate.Value = .Value
cboDate.SetFocus
.Visible = False
End With
End Sub
working well. However, when I add a new record the
default date on the calendar is the date I created it
rather than the current date. How do I show the current
date? Would appreciate any suggestions.
Here's my code:
Private Sub cboDate_MouseDown(Button As Integer, Shift As
Integer, X As Single, Y As Single)
With Calendar1
.Visible = Not .Visible
If .Visible Then
.SetFocus
.Value = Date
Else
cboDate.SetFocus
End If
End With
End Sub
__________________________________________
Private Sub Calendar1_Click()
With Calendar1
cboDate.Value = .Value
cboDate.SetFocus
.Visible = False
End With
End Sub