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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Time 91 in Public Function

Status
Not open for further replies.

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:

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.
 
I figured this out. Very unorthodox, I know.

Code:
Public Function ReportCategoryR()

    Reports!COOtherSelectionsFlooring.Room1R.Visible = True

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top