suppressing a detail line

  • Thread starter Thread starter John Smith
  • Start date Start date
J

John Smith

I'd like to conditionally suppress a detail line based upon the value of a
field. How can I do this?

Thanks in advance.
 
You can use the page header section's Format Event Procedure:

In Design view, double-click on the property for the Format Event in the
Page Header section, then click the ellipse (...)

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
Me.LineYouWantToHide.Visible = (Me.someControl = someValue)
End Sub

I ran a quick test, and I'm not sure why, but I couldn't directly access a
field in the recordset from this sub, so I settled for accessing the value
in a control that was bound to the desired field. If the report doesn't
display the field, you could make it invisible.

HTH
Paul Johnson
 
Back
Top