Calendar Control 10

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.
 
M

MikeB

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top