Code on a report

jeo

Registered User.
Local time
Today, 02:50
Joined
Dec 26, 2002
Messages
299
I have a report where sometimes text boxes have values and sometimes don't.
What I want to know if there is a way to code
If IsNull(Text10) Then
Text10.visible = False
End if
There is no Events on those text boxes and even when I try and code text10. the Visible option doesn't come up at all.
So I'm not sure if this is doable at all.
Any help would be appreciated.
Thank you.
 
Try using it in the OnFormat event of the Detail record.
 
This still didn't work...
See attached picture. I don't get that option unless I click on Application and then .visible appears and that doesn't work either.
Any ideas?
Thanks.
 

Attachments

This is what I had in mind…
Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
    If Me![HoursWorkedSubReport].Report.HasData = False Then
       Me![lblNonH].Visible = False
      Else
       Me![lblNonH].Visible = True
       End If
Exit Sub
End Sub
 
Thank you so much!
That worked great!
Much appreciate your time and help!
 
Me.Text10.Visible = Not IsNull(Me.Text10) in the on Format event for the detail section of your Report

.Visible does not come up in the intellisense for reports by default for some strange reason ,but it does work
 
That intellisense isn't that intelli then!
But thank you for all your help!
 
Last edited:
jeo said:
That intellisense isn't that intelli then!
But thank you for all your help!
it doesn't show all the list on Reports, there is a way of changing it, but I've forgotten how :D
 
As long as it works... and now I know it works.
Thank you.
 

Users who are viewing this thread

Back
Top Bottom