ActiveX Controls


If you have the Developer Edition of Office, or if you have other programs (such as Visual Basic) that include a set of ActiveX controls, you can also place several other controls on Access forms. The two most useful ones for Access forms are the DateTimePicker and the MonthView control, which are discussed in the next sections.

Important

Caveat: If you place one of these controls on an Access form, and then send the database to someone who doesn’t have these controls available (say because she has Office Pro instead of the Developer Edition), the controls won’t be displayed, and generally there will be a “There is no object in this control” message. This should be taken into consideration when using these extra controls.

DateTimePicker

The DateTimePicker control lets you select a date from a small pop-up calendar. When the calendar is closed, it takes up little space on a form. However, this control lacks the year navigation control of the regular calendar control, so it may be quite tedious to select a date with it, because you can only navigate by month. Figure 3.14 shows frmEmployeesActiveXControls, a variation of frmEmployees in the sample Toy Workshop database, with a DateTimePicker control dropped down to select the employee’s birth date from its calendar.

click to expand
Figure 3.14

MonthView Control

The MonthView control resembles the pop-up calendar used for the DateTimePicker control, but it is always visible. It also lacks the year navigation control, so if you need a calendar that is always visible, the regular calendar control is preferable. Figure 3.15 shows a MonthView control used to select the hire date on the same form as is used for the DateTimePicker control.

click to expand
Figure 3.15




Expert One-on-One(c) Microsoft Access Application Development
Expert One-on-One Microsoft Access Application Development
ISBN: 0764559044
EAN: 2147483647
Year: 2006
Pages: 124
Authors: Helen Feddema

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net