Access Controls  «Prev  Next»
Lesson 8The Calendar ActiveX Control
ObjectiveAdd the Calendar Control to a Form, binding it to a Data Source.

Calendar ActiveX Control

The Calendar control is a very intuitive yet powerful control. It is so easy to use that it is the only ActiveX control featured in the Access box itself.

Making sure the Calendar ActiveX control is available

To use the Calendar ActiveX control, you need to make sure you have the control registered. To find out about this, you can pick ActiveX Controls from the Tools menu. Then scroll down the available ActiveX controls to Calendar Control 8.0. You can see an example of the ActiveX Controls dialog here:

ActiveX Controls dialog
ActiveX Controls dialog

If you cannot see the control in the list, you will need to reinstall Access and make sure you choose to have the Calendar ActiveX control included.

Adding a bound Calendar control to a form

Once the Calendar control is available, adding it to a form is a piece of cake. Follow these steps:
  1. Create a form bound to a record source containing a date-type field, and open it in Design view.
  2. Display the field list.
  3. Click on the ActiveX control button
    Builder button
    Builder button

    , located in the toolbox.
  4. Pick the Calendar control from the list.
  5. Now take the cursor and highlight the field you want to use to bind the Calendar control.
  6. Holding the left mouse button down, drag and drop the field onto the form.

The Calendar control will now be displayed on the form, and its Control Source property will contain the field you want.

Property sheet for the Calendar Control

Besides having some properties displayed on the Other tab of the property sheet, ActiveX controls have their own properties. You can open ActiveX control property sheets by double-clicking in the center of the control itself.

Properties Of Calendar Control
View the MouseOver below to see the property sheet for the Calendar ActiveX control.

Calendar Properties

Builder button
  1. This tab is for the overall control features
  2. Lets you set various fonts on the Calendar control.
  3. You can set the colors for different parts of the calendar.
  4. When not bound to a field, this will be the date displayed initially.
  5. Lets you specify the first day of the week for the calendar.
  6. This specifies whether to display one letter for heading (short), three letters (medium), or the whole word (long).
  7. This specifies whether to display three letters for each month (short) or the whole word (long).
  8. How you want the cells on the calendar to look: Flat, Raised, or Sunken?
  9. Use thes properties for even more control over the look of the calendar.

In the next lesson, we will conclude this module.