wabtrainer
IS-IT--Management
At the moment I have an ActiveX calendar control to set a date in a textbox control.
When a button is clicked the calendar opens and when a date is selected the calendar closes and the textbox is updated.
So whats the problem I hear you cry!
Well the user who uses it sometimes uses it on the day its opened, which is the default and the only way to close the calendar is by choosing a different day to the one that is showing. She would like to close the calendar by clicking the button that opened the calendar in the first place.
Here is all the code I have at the moment.
-------------------------------------------
Private Sub ActiveXCtl18_AfterUpdate()
Me!myDate = ActiveXCtl18.Value
Me!myDate.SetFocus
' Close the calendar after picking a new valid date
Me!ActiveXCtl18.Visible = False
End Sub
------------------------------------------
Private Sub cmdDate_Click()
Me!ActiveXCtl18.Value = Now
Me!ActiveXCtl18.Visible = True
End Sub
------------------------------------------
Any ideas??
If you want to be a bear:
Be a Grizzly!
When a button is clicked the calendar opens and when a date is selected the calendar closes and the textbox is updated.
So whats the problem I hear you cry!
Well the user who uses it sometimes uses it on the day its opened, which is the default and the only way to close the calendar is by choosing a different day to the one that is showing. She would like to close the calendar by clicking the button that opened the calendar in the first place.
Here is all the code I have at the moment.
-------------------------------------------
Private Sub ActiveXCtl18_AfterUpdate()
Me!myDate = ActiveXCtl18.Value
Me!myDate.SetFocus
' Close the calendar after picking a new valid date
Me!ActiveXCtl18.Visible = False
End Sub
------------------------------------------
Private Sub cmdDate_Click()
Me!ActiveXCtl18.Value = Now
Me!ActiveXCtl18.Visible = True
End Sub
------------------------------------------
Any ideas??
If you want to be a bear:
Be a Grizzly!