ActiveX Control Calendar

G

Guest

Hello,

I have the ActiveX Control Calendar object on one of my forms. How do I
program the form/calendar such that double-clicking a date from this calendar
object will populate a start date text box and then double-clicking a second
date will populate a finish date text box?

Thanks to anyone with a response,
 
J

jorgedec

Hello,

I have the ActiveX Control Calendar object on one of my forms. How do I
program the form/calendar such that double-clicking a date from this calendar
object will populate a start date text box and then double-clicking a second
date will populate a finish date text box?

Thanks to anyone with a response,

I'm just a casual user but this should work for you:

Option Compare Database
Option Explicit

' Form module variable
Private flag As Boolean

Private Sub Form_Load()
' Initialize flag
flag = True
End Sub

Private Sub cal_DblClick()
' Toggle flag on double click
If (flag) Then
Me.start = CDate(cal.Month & "-" & cal.Day & "-" & cal.Year)
flag = False
Else
Me.end = CDate(cal.Month & "-" & cal.Day & "-" & cal.Year)
flag = True
End If

End Sub
 
I

i_takeuti

ProjectUser said:
Hello,

I have the ActiveX Control Calendar object on one of my forms. How do I
program the form/calendar such that double-clicking a date from this
calendar
object will populate a start date text box and then double-clicking a
second
date will populate a finish date text box?

Thanks to anyone with a response,
 

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