U
ucdcrush
Hi - I have a report where I would like to modify the Header appearance
(like textbox.visible = false) based on values in the Detail.
The problem I'm having is that there are multiple values by the same
variable name in the detail, and if I write something like this in the
header code:
--------------
Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As
Integer)
If Trim(MedicnType & "") = "Other" Then
Me.OtherDescLabel.Visible = True
else
Me.OtherDescLabel.Visible = False
End if
--------------
It seems to only "look" at the first MedicnType it comes across, and if
the first one is "Other" then it (correctly) displays the
"OtherDescLabel" label in the header. But if there are 3 rows of data
returned for the report (3 diff doctors visits) that it's looking in,
and if MedicnType of the first row = "Blood pressure", even if the 2nd
and 3rd rows are "Other" it goes off the first row/record and will do
Me.OtherDescLabel.Visible = False
So the question is, how can I test for the existence of "Other" within
MedicnType values so that I can properly show or hide the label?
Thanks.
(like textbox.visible = false) based on values in the Detail.
The problem I'm having is that there are multiple values by the same
variable name in the detail, and if I write something like this in the
header code:
--------------
Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As
Integer)
If Trim(MedicnType & "") = "Other" Then
Me.OtherDescLabel.Visible = True
else
Me.OtherDescLabel.Visible = False
End if
--------------
It seems to only "look" at the first MedicnType it comes across, and if
the first one is "Other" then it (correctly) displays the
"OtherDescLabel" label in the header. But if there are 3 rows of data
returned for the report (3 diff doctors visits) that it's looking in,
and if MedicnType of the first row = "Blood pressure", even if the 2nd
and 3rd rows are "Other" it goes off the first row/record and will do
Me.OtherDescLabel.Visible = False
So the question is, how can I test for the existence of "Other" within
MedicnType values so that I can properly show or hide the label?
Thanks.