Conditionally Control Report Fields Visible Property

DoneganF

Registered User.
Local time
Today, 10:08
Joined
Aug 7, 2012
Messages
29
Hello All,
I have a field on a report which I only want to display if the value is greater than zero. I tried the following code and parked it in the Report OnOpen Event. The error this codes generates is;

"You entered an expression that has no value"

Here's the code .....

Private Sub Report_Open(Cancel As Integer)
If Val(Me.NETCOLL) = 0 Then
Me.NETCOLL.Visible = False
Else
Me.NETCOLL.Visible = True
End If

End Sub

Any help is greatly appreciated!
 
Hi. On a report, you could try using either the Print or Format event.
 
I would have thought you would want the code in one of the detail events? On Print perhaps?
 
Thanks DBGuy .... very helpful. I figured the code was parked in the wrong place. I appreciate your help - and patience!
 
Thanks DBGuy .... very helpful. I figured the code was parked in the wrong place. I appreciate your help - and patience!
Hi. You're welcome. Gasman and I were happy to assist. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom