By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,934 Members | 1,692 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,934 IT Pros & Developers. It's quick & easy.

Select Calendar from the Form date field

P: 5
I would like to know the easy way to make my date field to pop up calendar to select my dates in a form date field. Thanks and let me know soon.
Dec 19 '07 #1
Share this Question
Share on Google+
2 Replies


missinglinq
Expert 2.5K+
P: 3,532
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.

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourTextBoxName_DblClick(Cancel As Integer)
  2.   YourCalendarName.Visible = True
  3. End Sub
Expand|Select|Wrap|Line Numbers
  1. Private Sub YourCalendarName_Click()
  2.   YourTextBoxName.Value = YourCalendarName.Value  
  3.   YourTextBoxName.SetFocus
  4.   YourCalendarName.Visible = False
  5. 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)>
Dec 19 '07 #2

P: 5
Thanks and let me try that one. Thanks a million. Happy Holidays.
Dec 19 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.