Drop down calendar on a MS Access form

  • Thread starter Thread starter Bill Z.
  • Start date Start date
B

Bill Z.

Can anyone tell me how to put a drop down calendar on a MC
Access form so that the user can click the field, the
calendar appears and they pick the date they want loaded
into the field?

Thanks Bill Z.
 
Click on the Toolbox button labeled "More Controls" then look for "Microsoft
Date and Time Picker"
I've used that control before. It may or may not work for you though. I
can't recall if the control comes with Access or Visual Basic. I'm pretty
sure that's the control you're looking for though.

Eric
 
There is a built in calendar control in MSAccess, but its easy enough
to roll your own.
Place 42 identical (you don't really need this many) invisible toggle
controls in a 7x6 frame on a new form
Toggle1...Toggle42

In the OnOpen define which of the controls is the starting point based
on the DOW of your default date. Set it to visible and its caption to
"1" Increment your counter and toggle button and repeat until all the
days in the month are used up.

Save your form

In your Main form, Place a command to open the Calendar box in the
OnEnterEvent. Open it as a Modal Dialog box. Pass it the default date
if you like via OpenArgs
Now in your calendar form, Place some code in the OnClose to push the
date selected into the calling Control

screen.ActiveForm.ActiveControl = dtmMine or thereabouts.
Or pass it to a global variable or hard code the reference, or
whatever naughty method you prefer

If you want to change the month & year, you will need to modify the
code accrdingly. I want to be able to cancel as well as up date, ditto
 
take a look at Microsoft Knowledge Base article 297381 if you do not have the tool shown in "more tools"
 
Click on the Toolbox button labeled "More Controls" then look for "Microsoft
Date and Time Picker"
I've used that control before. It may or may not work for you though. I
can't recall if the control comes with Access or Visual Basic. I'm pretty
sure that's the control you're looking for though.

Eric

"Bill Z." <[email protected]> wrote in message
news:[email protected]...
> Can anyone tell me how to put a drop down calendar on a MC
> Access form so that the user can click the field, the
> calendar appears and they pick the date they want loaded
> into the field?
>
> Thanks Bill Z.
Eric- I registered on this site for one purpose. To tell you thank you. I have been pulling my hair out looking for this feature. I knew it would exist, I just didn't know where to find it. it made my day, probably my week.
 
Back
Top