469,921 Members | 2,110 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,921 developers. It's quick & easy.

Select Calendar from the Form date field

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
2 2416
3,532 Expert 2GB
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
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.

Similar topics

8 posts views Thread by Shyguy | last post: by
1 post views Thread by jim_parent_804 | last post: by
6 posts views Thread by thorpk | last post: by
3 posts views Thread by thorpk | last post: by
1 post views Thread by swethak | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.