Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX Calendar Control

Status
Not open for further replies.

kokanee

Technical User
Mar 21, 2002
1
CA
I have a calendar control in an Access form that I would like to close when the date is clicked. Any help is appreciated.

Thanks!

Kokanee
 
Hello Kokanee...

In the form that you actually have the Calendar control, you will have to add the following lines of code:

Private Sub ActiveXCtl0_Click()
DoCmd.Close acForm, &quot;<form name>&quot;
End Sub

Even though the On Click event is not available from the properties sub-menu of the ActiveX object, you can still program it into your code. :)

You can also view the other events that you can use with the control by a) viewing the form's underlying code (the form that the ActiveX control is on), b) Selecting the ActiveX control name from the left combo box (object box) on the top left of the screen, and then viewing all the associated procedures for the object in the right combo box.

Hope this helps - if you require further assistance, let me know.

Greg Tammi, ATS Alarm Supervisor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top