Serena2345
asked on
Conditionally hide a label on an Access report
Please see sample atttached. I want to hide the label "Closing Date" when there in no date below it. I am working in Access 2007 Sample.pdf
Code correction:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull([ClosingDate]) Then
Me.ClosingDateLabel.Visibl e = False
Else
Me.ClosingDateLabel.Visibl e = True
End If
End Sub
Sample attached
Database78.mdb
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull([ClosingDate]) Then
Me.ClosingDateLabel.Visibl
Else
Me.ClosingDateLabel.Visibl
End If
End Sub
Sample attached
Database78.mdb
ASKER
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull([ClosingDate] Then
Me.ClosingDateLabel.Visibl e = False
Else
Me.ClosingDateLabel.Visibl e = True
End If
End Sub
It gives me a syntax error
If IsNull([ClosingDate] Then
Me.ClosingDateLabel.Visibl
Else
Me.ClosingDateLabel.Visibl
End If
End Sub
It gives me a syntax error
New sample attached.
As I stated, you need to pen the report in Print Preview specifically for the code to work.
Database78.mdb
As I stated, you need to pen the report in Print Preview specifically for the code to work.
Database78.mdb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for Serena2345's comment #a40788254
for the following reason:
thanks for all your help. I wish I could give more that 500 points
Accepted answer: 0 points for Serena2345's comment #a40788254
for the following reason:
thanks for all your help. I wish I could give more that 500 points
ASKER
I meant to give 500 points
;-)
Glad I could help.
Glad I could help.
In any event, ...On the format Format event of the section the label is in, ...do something like this:
If IsNull([ClosingDate] Then
me.ClosingDateLabel.Visibl
else
me.ClosingDateLabel.Visibl
End If
Then open the report in Print Preview