Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

invisbile field depending on its content

Status
Not open for further replies.

Davide77

Technical User
Mar 6, 2003
166
CH
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
 
You need to put the code in the Format Event for the section the material is in (usually the Detail Section). Then it will work.

Paul
 
If i have difference group on many page eg(difference Customer print at one go)how i hide the field cos i only can do it on one group (Print one Customer)with the code above thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top