Hallo,
my question could sound a bit silly but how can I hide a field in a report depending on the content of the field. Such as if the fiels is ="yes" then visible = false. It should be an easy thing but since I'm not very used to visual basic it doesn't work. Here is the code I used:
Private Sub Report_Open(Cancel As Integer)
If [ReportName]![FieldName] = "Yes" Then
[ReportName]![FieldName].Visible = False
Else
[ReportName]![FieldName].Visible = True
End If
End Sub
my question could sound a bit silly but how can I hide a field in a report depending on the content of the field. Such as if the fiels is ="yes" then visible = false. It should be an easy thing but since I'm not very used to visual basic it doesn't work. Here is the code I used:
Private Sub Report_Open(Cancel As Integer)
If [ReportName]![FieldName] = "Yes" Then
[ReportName]![FieldName].Visible = False
Else
[ReportName]![FieldName].Visible = True
End If
End Sub