Calendar in Access - Click to edit

Tymimi4

New member
Local time
Today, 11:30
Joined
Aug 10, 2016
Messages
4
I found some wonderful code for a Calendar of Events here and am incorporating it into my db. They have code where you click on the day in the calendar and all that day's events show in a list. I want to be able to click on an event in the list and have a form pop up to edit the event. I have attached the current code.

Any help would be appreciated - I am fairly new at this! Thank you!
 

Attachments

Here is the database with the code.
 

Attachments

When I open the database I get the message, "Your Microsoft Access database or project contains a missing or broken reference to the file MSCAL.OCX version 7.0"

According to this site "Microsoft Access has included a Calendar control since it first added support for ActiveX controls, in Access 2.0. The calendar control, MSCAL.OCX, is not included with Access 2010."

Do you really want to use code that's obsolete in later versions of Access?
 
I am not seeing anywhere in the code that is actually using that control. I am a newbie at this but understand the basics. Do you see where that control is being used?
 
Last edited:
I see where the calendar control for ms 2013 was checked to be used in the db but not an old control
 
I removed the offending reference and the error went away so I don't know what was going on.

Back to your original question I noticed the events are maintained in the Training_Events form so you can just open that form in the click event of the list box. The list box has the TskID in the first column so you can add a where clause in the form open. The event code then looks like:

Code:
Private Sub lstEvents_Click()
 DoCmd.OpenForm "Training_Events", acNormal, , "TskID =" & Me.lstEvents.Column(0), , acWindowNormal
End Sub

When you close the Training_Events form it complains that you can't hide a control with focus. So you will need to find the places where lstEvents is hidden (lstEvents.Visible = False) and set the focus to somewhere else before that line is executed.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom