Phucon
Try it this way:
Me.lblTotal.Visible = Not IsNull(Me.txtTotal)
And it should be in the group footer's Format section, not the Detail section.
I'm not sure why you were testing with an equal sign.
Bill Mosca
---In MS_Access_Professionals@yahoogroups.com, <saigonf7q5@yahoo.com> wrote:
My report's group footer has a label named "Total:" and a text box "txtTotal", which for displaying the sums of the [Amount] field in the detail line. The label "Total:" is visible on every group' footer even there's nothing (is null) to display. How do I display the label "Total:" only when the text box has a value to show?
I tried this lines of code (F8, step through it), some how it executed at 1 time and it seems to work, then it's never run again. What is the correct way to do it?
Thank you
Phucon
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.txtTotal & "" = "" Then
Me.lblTotal.Visible = False
Else
Me.lblTotal.Visible = True
End If
End Sub
__._,_.___
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar