What I'm working on is setting the Visibility of a Bound Object Frame to False or No if there is no data beside it, so the space will collapse. Basically I'm just trying to get the "Can Shrink" functionality like you get with text boxes.
I'm able to accomplish this all via Event Procedures in the Headers, however it is a bit slow, because it process all the code for all sub headers for each piece of data. Here is what my Report Design looks like: http://webpages.charter.net/orum/07.jpg
And below is what the Event Procedure script looks like. It is one script for all headers as you can see. I think that is where the problem is, because if there is data in header 2, the code for headers 3 & 4 still get processed. I have large parts of the report that only have data in header 0 or 1, but for each instance of those pieces of data, all sub (2, 3, 4) headers' Event Procedure script sections gets run, and slows the report way down.
Can split this code out, so only the header code for each header runs, with no extra? Thanks much.
Option Compare Database
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.Tier0TaskName) Then
Me!Tier0Icon.Visible = False
Me!Tier0Icon.Visible = True
Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.Tier1TaskName) Then
Me!Tier1Icon.Visible = False
Me!Tier1Icon.Visible = True
Private Sub GroupHeader2_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.Tier2TaskName) Then
Me!Tier2Icon.Visible = False
Me!Tier2Icon.Visible = True
Private Sub GroupHeader5_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.Tier3TaskName) Then
Me!Tier3Icon.Visible = False
Me!Tier3Icon.Visible = True
Private Sub GroupHeader6_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.Tier4TaskName) Then
Me!Tier4Icon.Visible = False
Me!Tier4Icon.Visible = True
Wow...I think have been looking at my screen too long. Of course it will have to process them all, if I want the objects' visibility set properly....right? I think we should just pretend I never posted to begin with. Thanks all.