HELP, can't get report to display!

tony7ana

Registered User.
Local time
Today, 04:42
Joined
Aug 2, 2012
Messages
13
I found this calendarr which runs perfectly but I cant get the report function to work. When I run it, I am getting an error in the below code. I only need the calendar report, i dont care about the rest. Any suggestions and thank you for looking at this in advance!! file is attached.

Case 3
Forms!frmCalendar.Visible = False
 

Attachments

The issue appears to be with the way the code is referencing the subform holding the calendar.

Forms!frmCalendar.Visible = False is not correct. When referencing a subform you need to use the parent forms name also like:

Forms![Form1]![frmCalendar].Visible = False would be correct.

However, this is only the start of the problems because the subform (frmCalendar) will have the focus at the time of calling the report so you would not be able to hide it unless you se focus to a control on form1 first. Then further coding needs changing as it to wrongly references the subform.
 

Users who are viewing this thread

Back
Top Bottom