G
Guest
Hi..I have noticed in a previous post that the command
Me.[myreportfield].Visible=True (or False) used in the OnFormat property can
hide or display the field based on the condition.
I got a couple of questions.
1. Does it matter whether it is used in the Detail Section of the report or
the Footer Section?
2. Can it be used to hide lines?
3. When Printing more than one record, it only checks the condition on the
first record. The next record will keep the condition based on the first
record even it is different. Here's my code...
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.New = "New" Then
Me.EExBldg.Visible = False
Me.EExFlr.Visible = False
Me.EExRoomNo.Visible = False
Me.EExID.Visible = False
Me.EExMonAlT.Visible = False
Me.MonitorAlarmNeed.Visible = False
End If
End Sub
4. Why the following code does not do any effect?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.FPLF = "Not Defined" Then
ElseIf Me.StgFPLF = "Not Defined" Then
ElseIf Me.StgLF = "Not Defined" Then
Me.Line1.Visible = False
Me.Label1.Visible = False
Me.Label2.Visible = False
Me.Label3.Visible = False
End If
End Sub
Your help will be appreciated.
Me.[myreportfield].Visible=True (or False) used in the OnFormat property can
hide or display the field based on the condition.
I got a couple of questions.
1. Does it matter whether it is used in the Detail Section of the report or
the Footer Section?
2. Can it be used to hide lines?
3. When Printing more than one record, it only checks the condition on the
first record. The next record will keep the condition based on the first
record even it is different. Here's my code...
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.New = "New" Then
Me.EExBldg.Visible = False
Me.EExFlr.Visible = False
Me.EExRoomNo.Visible = False
Me.EExID.Visible = False
Me.EExMonAlT.Visible = False
Me.MonitorAlarmNeed.Visible = False
End If
End Sub
4. Why the following code does not do any effect?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.FPLF = "Not Defined" Then
ElseIf Me.StgFPLF = "Not Defined" Then
ElseIf Me.StgLF = "Not Defined" Then
Me.Line1.Visible = False
Me.Label1.Visible = False
Me.Label2.Visible = False
Me.Label3.Visible = False
End If
End Sub
Your help will be appreciated.