G
Guest
I have a form with a text box, [DueDate],that the user enters a date into. I
want to make a "pop-up" calendar available for the user to select a date. I
put a command button next to the text box with the code:
Private Sub btnCalendar_Click()
Me.Calendar1.Visible = True
End Sub
I also have a Calendar (using Access' built-in one) that is set to be
invisible by default. The code I'm using for it is:
Private Sub Calendar1_Click()
Me.DueDate = Me.Calendar1.Value
Me.DueDate.SetFocus
Me.Calendar1.Visible = False
End Sub
This code is designed to have [DueDate] take the value clicked on by the
user and then make the calendar disappear. Everything works fine, except
when the user changes the month and/or year with the drop-down menus at the
top of the calendar. If the user changes one of these and then selects a
date, the calendar will disappear, and focus will be set to [DueDate], but
the value of [DueDate] will not be changed to what the user selected. It
simply remains as it was before. Any idea what I'm doing wrong? Thanks in
advance for any replies.
want to make a "pop-up" calendar available for the user to select a date. I
put a command button next to the text box with the code:
Private Sub btnCalendar_Click()
Me.Calendar1.Visible = True
End Sub
I also have a Calendar (using Access' built-in one) that is set to be
invisible by default. The code I'm using for it is:
Private Sub Calendar1_Click()
Me.DueDate = Me.Calendar1.Value
Me.DueDate.SetFocus
Me.Calendar1.Visible = False
End Sub
This code is designed to have [DueDate] take the value clicked on by the
user and then make the calendar disappear. Everything works fine, except
when the user changes the month and/or year with the drop-down menus at the
top of the calendar. If the user changes one of these and then selects a
date, the calendar will disappear, and focus will be set to [DueDate], but
the value of [DueDate] will not be changed to what the user selected. It
simply remains as it was before. Any idea what I'm doing wrong? Thanks in
advance for any replies.