What I do for this type of thing is place a calendar control on the form, positioned as you like and set it's Visible Property to NO.
Then, using the DoubleClick property of your text box, have the calendar "popup" for date selection. You'll need to replace
YourCalendarName and
YourTextBoxName with the actual names of your calendar and text box.
- Private Sub YourTextBoxName_DblClick(Cancel As Integer)
-
YourCalendarName.Visible = True
-
End Sub
- Private Sub YourCalendarName_Click()
-
YourTextBoxName.Value = YourCalendarName.Value
-
YourTextBoxName.SetFocus
-
YourCalendarName.Visible = False
-
End Sub
Now, all your user has to do is DoubleClick on the text box and up pops the calendar! When the user clicks on the date, the calendar disappears and the text box is populated with the date.
Welcome to TheScripts!
Linq
;0)>