Calendar

  • Thread starter Thread starter Cheryl
  • Start date Start date
Hi,
First off, you have to have installed the Calendar control.
It's not installed by default during the office install.

Once it's installed, when you have your form in design view, click on the
activex icon (hammer and wrench) in your Toolbox. This will bring up a
list of controls. Choose the Calendar control from this list.
 
Hi,
Well, you can't. The control is meant to be placed on a form.
You can have the click event of a text box open the form with the
control on it though.
 
Thank you. Now, how can I put the calendar in a drop down
box to select a date?

A Calendar Control is one way to pick dates; a Combo Box (a "drop
down") is a different kind of control which can (if you set it up that
way) also be used to pick dates. But you can't put a Calandar Control
in a combo box!

One trick I use to get a combo with the next (say) month's dates is to
have a table named Num with a single field N, with values from 0 to
1000. This table gets a lot of use in many contexts.

You can create a Query:

SELECT DateAdd("d", [N], Date()) FROM [Num] WHERE [N] <= 30 ORDER BY
N;

and base the Combo on this query. It'll show dates from today for the
next thirty days. Adjust the criteria as desired. If you want to
exclude weekends, for instance, use

SELECT DateAdd("d", [N], Date()) FROM [Num] WHERE [N] <= 30 ORDER BY N
AND Weekday(DateAdd("d", [N], Date()), vbMonday) < 6;
 
-----Original Message-----
How do you place a calendar in forms?
.

Stephen Lebans has a calendar control method I
particularly like. It's probably more complicated to
implement than the Access ActiveX component, especially if
any amount of Visual Basic makes you uncomfortable, but
it's better overall in my opinion.

The link to his website:

http://www.lebans.com/monthcalendar.htm

I also mention it on my website (mainly I'm referencing
his, though). The link:

http://www.lebans.com/monthcalendar.htm

LRH
 
Back
Top