Discussion Locked

M.S Access Calendar (Adding to a Field)

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Where can I find detailed information on (or doe's any one know about) adding the Calendar activeX control.
I am trying to link the calendar to a field so that when the user click's the field the calendar appears. I need the calendar to have a 'Select date' button on it so that when selected, the date is entered in the field and the calendar closes.

How! How! How! though?

6 replies

by sillycarissa

The best and easy way to explain it is to look at the "Developers Solution" database that you should have installed with MS Access. This database provides you with great examples including calendar control. After opening Developers Solutions, click on "Work with Forms and Controls" then select "Use the Calendar custom control to select dates" at the bottom of the screen. This will provide you with extremely detailed procedure and code to set up your calender. I have used it many times and it's great.

by maxwell edison

Registering ActiveX controls in Access
To use an ActiveX? control (formerly called OLE controls or custom controls) in a Microsoft? Office application, you must first register the control. This tip explains how to register ActiveX controls in Microsoft Access by using the Calendar control as an example. Once you register an ActiveX control, you can use it in any Office application as well as in other Microsoft development products such as Visual Basic?.

Get the Calendar Control
The Calendar control (Mscal.ocx) displays a monthly calendar that you can insert in a form. You can use it to collect date-selection information. The Calendar control is not installed with a typical installation of Office 97. You can download a copy of the latest version of the Calendar control free from:

http://microsoft.com/OfficeDev/FreeStuff/mscaldl.htm.

When you download the Calendar control and are prompted for a location in which to place Mscal.ocx, type C:\Windows\System in the text box provided.

Register the Calendar Control

Note: The directions given here are specific to the Calendar control. However, you can follow this procedure to register any ActiveX control that is new to your system.

To register the Calendar control:

Open any Access database. If you have not created an Access database, open the Northwind.mdb sample database. The default location of this database in a typical installation of Office 97 is C:\Program Files\Microsoft Office\Office\Samples.

On theTools menu, click ActiveX Controls.

Click Register.

(continued in comments...)

by maxwell edison

.
.
In the Add ActiveX Controls dialog box, navigate to the C:\Windows\System folder, click Mscal.ocx, and click Open.

Click Close and then close the Northwind database.

The Calendar control is now available to use in any host that supports ActiveX controls; for example, Office 97 applications, Visual Basic, and HTML pages.

See Also To see a good example of using the Calendar control in an Access form, open the Solutions sample database. In the Select a Category of Examples box,click Work with forms and controls; then in the Select an Example box, click Use the Calendar custom control to select dates. If you do not have the Solutions sample database installed, you can find it on your Office 97 CD-ROM in D:\Office\Solutions.mdb, where D is the name of your CD-ROM drive. You can also download it from:

http://microsoft.com/Accessdev/Articles/Solution.htm.

Source:

http://www.microsoft.com/officedev/tips/regactx.htm

(REMOVE SPACES from the pasted URLs.)

Regards,

Maxwell

This discussion is closed to new replies.