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, "<form name>"
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.