Open datepicker automatically on textbox selection

  • Thread starter Thread starter Olly
  • Start date Start date
O

Olly

At the moment the user needs to click the textbox, and then on the
datepicker symbol to open the datepicker control. I am looking for a
way to open the datepicker automatically when the user enters into the
textbox, either through clicking on it or entering during the tab
cycle.

For example to open a combo box when the user's cursor enters it you
use "Screen.ActiveControl.Dropdown" in a function that is called from
the form objects "onenter" method. I'm looking for something similar
for the datepicker control.

cheers
Olly
 
Thanks

But that wasn't really what I was looking for. I needed something
that would display in the same form. So I used the Calendar Active X
control, and used the visibility property to show and hide it as
necessary.

cheers
Olly
 
Place RunCommand acCmdShowDatePicker in the GotFocus Event. My code for a textbox is as follows

Private Sub DateSelect_GotFocus()
RunCommand acCmdShowDatePicker
End Sub
 
Back
Top