jt463
IS-IT--Management
- Nov 23, 2005
- 134
I am getting the Run Time 91 error (Object Variable or With Variable Block Not Set) on the following code:
From reading other threads, I am sure that I am not defining my report correctly.
I have a rather complex report set up with numerous labels that I want to hide/unhide controls (this is similar to my thread705-1197983 but I figure since it is now a report that I should start a new thread). I am going to work on utilizing the suggestions by the users in that thread for my report. But for the time being, I need to figure out how to instantiate my COOtherSelectionsFlooring as a 'Report' in my function so that the Public Function will be able to be called from the OnOpen Event for my report.
Code:
Public Function ReportCategoryR()
Dim COOtherSelectionsFlooring As Report
Set COOtherSelectionsFlooring = [COOtherSelectionsFlooring].Report
COOtherSelectionsFlooring.Room1R.Visible = True
From reading other threads, I am sure that I am not defining my report correctly.
I have a rather complex report set up with numerous labels that I want to hide/unhide controls (this is similar to my thread705-1197983 but I figure since it is now a report that I should start a new thread). I am going to work on utilizing the suggestions by the users in that thread for my report. But for the time being, I need to figure out how to instantiate my COOtherSelectionsFlooring as a 'Report' in my function so that the Public Function will be able to be called from the OnOpen Event for my report.