Hide detail section of a report with criteria

genesis

Registered User.
Local time
Today, 06:25
Joined
Jun 11, 2009
Messages
205
good day!

I would like to ask how to hide certain row record in the detail section of the report form if for example the value of the textbox is zero.

I have not done this before so I have no idea. I have also googled it before I asked here but I cannot find exact information.
 
You would generally exclude the zero values with the query underlying the report. You can hide the detail section with:

Me.Detail.Visible = False
 
yes I have tried to use that but nothing happened. I use that on OnPrint event.

I have this code:


Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Me.TT.Value = 1 Then
Me.Detail.Visible = False
End If
End Sub


I am correct to use the onprint event of the detail section?
 
I would use the detail format event. You would also want to add an Else to set it to visible.
 

Users who are viewing this thread

Back
Top Bottom