J
John Davis
I am writing a program that allows user to select the date in
a calendar, and it will update the text fields automatically.
I created 2 forms. The first form has 2 text fields (start date and
end date), and 2 buttons. When the user clicks the button, it will
invoke the calendar form. Here's the code fragment for the first form:
Private Sub Command1_Click()
Dim instanceCalendarForm As CalendarForm
Set instanceCalendarForm = New CalendarForm
instanceCalendarForm.Show
End Sub
Public Sub setTextDate(aDate As String)
startText.Text = aDate
startText.Refresh
End Sub
The second form contains the MonthView activeX control. I am not sure
if I can invoke a MonthView control without putting in on another form.
Any ideas? Here's the code fragment for the second form:
Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
startDate = MonthView1.Month & "/" & MonthView1.Day & "/" &
MonthView1.Year
instanceForm1.setTextDate (startDate)
End Sub
The problem is I cannot update the text field in form1 even the user clicks
the
date on calendar control. Any ideas?? Please advice. Thanks!!!
John
a calendar, and it will update the text fields automatically.
I created 2 forms. The first form has 2 text fields (start date and
end date), and 2 buttons. When the user clicks the button, it will
invoke the calendar form. Here's the code fragment for the first form:
Private Sub Command1_Click()
Dim instanceCalendarForm As CalendarForm
Set instanceCalendarForm = New CalendarForm
instanceCalendarForm.Show
End Sub
Public Sub setTextDate(aDate As String)
startText.Text = aDate
startText.Refresh
End Sub
The second form contains the MonthView activeX control. I am not sure
if I can invoke a MonthView control without putting in on another form.
Any ideas? Here's the code fragment for the second form:
Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
startDate = MonthView1.Month & "/" & MonthView1.Day & "/" &
MonthView1.Year
instanceForm1.setTextDate (startDate)
End Sub
The problem is I cannot update the text field in form1 even the user clicks
the
date on calendar control. Any ideas?? Please advice. Thanks!!!
John