Cancel Detail Section depending upon data

Magster

Registered User.
Local time
Today, 01:17
Joined
Jul 30, 2008
Messages
115
Hi - I'm trying to skip printing the detail section when my data is empty. I thought it would be as easy as checking the field in the detail format section as shown below. I even tried to set the height of the row and field that I want to show. The me.delay text is evaluated and it goes into the proper part of the if statement, but nothing happens on the report. Any help would be appreciated!


Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.DelayText = "" Then ' empty text, don't display detail section
Me.Detail.AutoHeight = True
Me.Detail.Height = 0
Me.DelayText.Height = 0
Else
Me.Detail.AutoHeight = True
Me.Detail.Height = 0.1667
Me.DelayText.Height = 0.1667
End If
End Sub
:rolleyes:
 
I'm not sure if this is the effect you are looking for but...

Me.Detail.Visible = Val(Nz(Me.DelayText, 0))

.
 
Hi - thanks, but that is basically what I did in the query... what I'd like to do is collapse the detail section when I don't have a value to print. Right now the spacing stays the same whether I am printing a detail line or not.:( Wait - I reread your comment and maybe I could use that, but where would you put that?
 

Users who are viewing this thread

Back
Top Bottom