I have a report that has several ole objects in it attached to several Headings. Some objects may be left empty and I would like to hide them so that there are no big empty gaps on my report. I have used the following instructions, but it doesn't work unless I put the name of every object in the "On Format" line of the details section of my report e.g.
Is there a way to check through every object on my report and hide the ones missing.
Instructions I have used: Create a module ->
I have also set the CanShrink to Yes in the details section of the report and the instructions say to put =hidenullole([ctl]) in the "On Format" line of the properties.
I have also added unbound text boxes on the report to overlap the photos etc.
If you understand what I am getting at, I would really appreciate some help.
Thanks
LH
=hidenullole([OPPhoto1])+hidenullole([OPPhoto2])
etcIs there a way to check through every object on my report and hide the ones missing.
Instructions I have used: Create a module ->
Code:
Option Explicit Function HideNullOle (ctl As Control) On Error Resume Next ctl.visible = Not IsNull (ctl If Err = 2427 Then ctl.visible = True End Function
I have also added unbound text boxes on the report to overlap the photos etc.
If you understand what I am getting at, I would really appreciate some help.
Thanks
LH
Comment