authorsami
Instructor
I have a report that I need to show a particular field only if another field has a certain value. Actually if either of two fields have a certain value.
I got how to do this on a form, but now I need to see if there is a way to do this on a Report. I have listed below what I thought the code would be.... I'm not having any luck.
Anyone have a suggestion on this one?
My report name is rptPatientDataShee
My one field is qryLeftSales.Terms
My second field is qryRightSales.Terms
the value they need to have is "Lease"
if either of these two fields say Lease I want field Text97 to be visable, if both do not say Lease I don't want the Field text97 to how at all.. If only one field says "Lease" I do want field Text97 to show. I hope this makes sense.
----
Private Sub Report_Open(Cancel As Integer)
If Reports!rptPatientDataSheet!_[qryRightSales.Terms].Value = "Lease" Or Reports!_rptPatientDataSheet![qryLeftSales.Terms].Value = "Lease" _Then
Text97.Visible = True
Else
Text97.Visible = False
End If
End Sub
----
Thanks Sharon
I got how to do this on a form, but now I need to see if there is a way to do this on a Report. I have listed below what I thought the code would be.... I'm not having any luck.
Anyone have a suggestion on this one?
My report name is rptPatientDataShee
My one field is qryLeftSales.Terms
My second field is qryRightSales.Terms
the value they need to have is "Lease"
if either of these two fields say Lease I want field Text97 to be visable, if both do not say Lease I don't want the Field text97 to how at all.. If only one field says "Lease" I do want field Text97 to show. I hope this makes sense.
----
Private Sub Report_Open(Cancel As Integer)
If Reports!rptPatientDataSheet!_[qryRightSales.Terms].Value = "Lease" Or Reports!_rptPatientDataSheet![qryLeftSales.Terms].Value = "Lease" _Then
Text97.Visible = True
Else
Text97.Visible = False
End If
End Sub
----
Thanks Sharon