Invoke Date Picker on Text Box using VBA

I am working with a form in Access 2010. I have a text box which has a date field for its source. I would like to set up a command button so that when the command button is clicked, it will cause the date picker for that text box to pop up. In other words, I would like to code the sub that handles the command button's click event so that focus is set to the text box and the date picker is evoked. Is there a way to do this in VBA?
Thanks,
Todd
LVL 7
shambaladAsked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Connect With a Mentor Database ArchitectCommented:
I don't think ... that's going to happen..

The date picker scenario only seems to work when you click into the text box, which triggers the picker if the data type is date/time.  Setting the focus to the text box does not seem to trigger it.  Even clicking in the text box one it has the focus does not seem to trigger it.

mx

0
 
conagramanCommented:
if the field in the table is date/time each time the textbox has the focus a little calendar icon will appear and when pressed will make a calendar appear
0
 
conagramanCommented:
here is a quick example
Database11.accdb
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
I think the OP knows this ... wants it to happen with a button.

mx
0
 
conagramanCommented:
didnt notice he was a master - my bad
still though he might not
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
well ... maybe not ...
0
 
shambaladAuthor Commented:
I guess I could use the date picker I used way back before MS decided to tease us with this built-in picker.
Thanks,
TOdd
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Unfortunately, as usual with many new features..... not fully implemented.   The Date Picker is VERY weak .
0
 
Jeffrey CoachmanMIS LiasonCommented:
Then perhaps using one of the many third party Date Picker/calendar controls is an option?

http://www.granite.ab.ca/access/calendars.htm
http://www.accessmvp.com/JConrad/accessjunkie/calendars.html

JeffCoachman
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.