Hide label in Report

sdawson

Registered User.
Local time
Today, 17:06
Joined
Apr 22, 2003
Messages
165
I am trying to hide a label in a report which is conditional on the results of the value of a text box (=Sum([Field])) calculated when the report is run.

The Visible = False/True function does not appear to be available in Reports. Or is it?

Failing this is there a way round this?


:confused:
 
Last edited:
Sorry Rabbie mate, not sure what you mean?
When I type in the code, .Visible is not recognised?
 
I do it in my reports in the OnFormat event so I know you can do it. Where are you putting your code?
 
Private Sub Report_Open(Cancel As Integer)
If Me.Text20 > 499 Then
Me.Label50 = Visible.False
End If

End Sub

I get an error mesage "Complie Error - Invalid qualifier".
 
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
If Me.Text20 > 499 Then
Me.Label50 = Visible.False
End If
End Sub

Tried this but still same error mesage?
 
Your code is not correct. It should be
Code:
If Me.Text20 > 499 Then
 Me.Label50.visible = False
Else
 me.label50.visible = true
End If

[code]

I always use the onformat event for this sort of code. but try it and see what happens.
 
That's 2 pints now I believe.

Thanks.
 

Users who are viewing this thread

Back
Top Bottom