Calendar Control 10

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have a Calendar Control 10 object imbedded in one of my forms. The form
will has 5 date fields in it. I can successful enter dates into one field
using the following code.

Private Sub Calendar_Click()
DateTimeFollowup.Value = Calendar.Value
DateTimeFollowup.SetFocus
Calendar.Visible = False
End Sub

Private Sub DateTimeFollowup_MouseDown(Button As Integer, Shift As Integer,
X As Single, Y As Single)
Calendar.Visible = True
Calendar.SetFocus
Calendar.Value = IIf(IsNull(DateTimeFollowup), Date, DateTimeFollowup.Value)
End Sub

I would like to only use the one calendar object, and have its on click
event change as I move through my date fields.

Thanks in advance.
 
John said:
I have a Calendar Control 10 object imbedded in one of my forms. The form
will has 5 date fields in it. I can successful enter dates into one field
using the following code.

Private Sub Calendar_Click()
DateTimeFollowup.Value = Calendar.Value
DateTimeFollowup.SetFocus
Calendar.Visible = False
End Sub

Private Sub DateTimeFollowup_MouseDown(Button As Integer, Shift As Integer,
X As Single, Y As Single)
Calendar.Visible = True
Calendar.SetFocus
Calendar.Value = IIf(IsNull(DateTimeFollowup), Date, DateTimeFollowup.Value)
End Sub

I would like to only use the one calendar object, and have its on click
event change as I move through my date fields.

Here is a link to an AC2000 db with a Calendar Form that can be called to return a value to any text box,
by click, dblClick, or push button. Works with subforms and embedded subforms.
http://www.byerley.net/AccessCalDemo.zip
 
Back
Top