Full Version: Revising Report Control's Visible Property
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
Retired
Sorry, but I've read so many FAQ's and other postings my eyes are burning. But haven't found a fix that will probably end up being quite simple.

I would like to make the contents of a report control invisible dependent upon the contents of another control.
Away2TalkNo is a number control and Away2Spkr is a text control.

Here's the code I've used (under Detail_Format)
--------------------------------------------
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Away2TalkNo Is Null Then
Me.Away2Spkr.Visible = False
Else
Me.Away2Spkr.Visible = True
End If
End Sub
-------------------------------------------
Shouldn't this work?

Thanks, Jay Witt
tunkefer
Try this:
If IsNull(Me.Away2TalkNo) Then
R. Hicks
Try ...

CODE
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Away2Spkr.Visible = Not IsNull(Me.Away2TalkNo)
End Sub

RDH
Retired
Hello Tunkefer,

Yes, that did it! Thank you.

Lived near Cleveland in Lorain for over 30 years and 2 yrs in Garfield Heights. Miss the beautiful Ohio spring and fall weather . . . but not the wet cold winters!

Regards, Jay
Retired
Yes to you also!

Thanks, Jay Witt
R. Hicks
No problem .. wink.gif

RDH
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.