get the free newsletter:

rss:
Subscribe to the RSS Feed
  Visit Applied Office's Website Contact  
 

December 2006 : access

 

  adding a calendar to your form


Having a visual of the calendar makes it much easier to choose the right date when entering data into a form.  Not only that, but it takes the guesswork out of the right sequence to enter the date, month, and year.

In this article we’ll show you how you can let users select a date directly from a calendar for data entry, rather than having them enter it manually. Note: The calendar control is not installed as part of a typical Office installation. You may have to re-run your Office setup to install the calendar ActiveX control.

Inserting the control

Adding the calendar control is just like any other control. Open the database in Design view, click the More Controls button on the Toolbox and select the Calendar Control for your version from the resulting list.

After the calendar control is selected, click and drag to draw the control on the form as shown below. As you can see, the control provides options to change the month and year that are currently displayed. The control’s daily grid, with day of the week headers makes it easy for users to select specific days of the week.

Once the calendar control is inserted, you can connect it to a field in a table so the control can be used for data entry. Keep reading to find out how to set up the calendar control to enter dates into your tables.

Inserting the date into a table

You want the calendar control to be more than just a pretty face on a form. To make the control a useful way to enter dates, you must link the control to a field. Doing this requires you to alter the control’s properties. (Before you try to link the control to a field, make sure the form is connected to a table.)

(continued on right...)

 

  quick jump


Jump to other stories through these links:

[http://www.appliedoffice.net/news/2006-dec/news contents.htm]

  ...continued


Right-click the calendar control and select Properties from the shortcut menu. Click the Data tab. Click the Control Source property list arrow and select the name of the field to which you want to link the control and close the Properties sheet.

Customizing the control

As with other controls, you can customize the appearance and functionality of the calendar control to match your needs.

Open the form in Design view, then right-click on the calendar control and select Calendar Object > Properties from the shortcut menu. Access displays the set of properties available for the control.

Using this exciting control in your forms will lend a professional and exciting look and feel to your forms.

  get an Access class or consulting


Request an on-site Access class, or database consulting, from Applied Office sometime next year.  Sessions are just $95/hr and you'll learn from a Microsoft Certified Professional.

Learn more here.