Steve R.
Retired
- Local time
- Today, 07:40
- Joined
- Jul 5, 2006
- Messages
- 5,710
I have Access 2007. I placed the ActiveX Calendar (version 12) on a form. I can get it to partially work. What I was hoping to do was to click on a date and have that date become the stored value. That is not happening.
However, I can get the selected date to store by making a second click on a command button(Set Date) that forces a refresh of the form. Clearly the form experienced a change because refreshing the form updated the text boxes.
The ActiveX calendar has an "On Updated" event. I expected this event to act similar to either the "On Change" event or the "After Update" event for normal controls, but that is not happening. I have attached the test database "CalendarText.mdb"
The code below does not seem to execute. So I am unsure how to get it to execute.
I can get the correct result by first clicking on a date, then by clicking on "Set Date" command button. But that takes two clicks. I was hoping that the "On Updated" event would provide one click functionality.
Please note, virtually all the calendar examples that I have run across use the calendar as a pop-up to a text field, which is my current design. I am NOT after that approach. I would like the user to simply directly click on a calendar date. The text boxes on the form are for observing the results, not for data entry.
However, I can get the selected date to store by making a second click on a command button(Set Date) that forces a refresh of the form. Clearly the form experienced a change because refreshing the form updated the text boxes.
The ActiveX calendar has an "On Updated" event. I expected this event to act similar to either the "On Change" event or the "After Update" event for normal controls, but that is not happening. I have attached the test database "CalendarText.mdb"
The code below does not seem to execute. So I am unsure how to get it to execute.
Code:
Private Sub Calendar2_Updated(Code As Integer)
Me.Text0 = Me.Calendar2.Value
End Sub
I can get the correct result by first clicking on a date, then by clicking on "Set Date" command button. But that takes two clicks. I was hoping that the "On Updated" event would provide one click functionality.
Please note, virtually all the calendar examples that I have run across use the calendar as a pop-up to a text field, which is my current design. I am NOT after that approach. I would like the user to simply directly click on a calendar date. The text boxes on the form are for observing the results, not for data entry.