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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make field visible in Report Depending on its Value

Status
Not open for further replies.

firsttube

Technical User
Apr 21, 2004
165
CA
Is it possible to make a field of a particular record in a report visible depending on it's value?

eg.

if field = 0 then "do not show it on the report"

thanks

ft
 
firsttube
In the Properties for the Detail section of the report, put the following code in the Format event.

If Me.YourControlName = 0 Then
Me.YourControlName.Visible = False
Else
Me.YourControlName.Visible = True
End If

Check the name of the control that pulls data from the field in question...that's what you put where I have showed YourControlName.

In tables they are called fields. In forms and reports they are controls and text boxes.

Tom
 
that did not work. I stripped it right down to just:
Me.ControlName.Visible = False

and it still showed the control.

any ideas

thanks

ft
 
Try:
Me.ControlName.Visible = Me.ControlName <> 0

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top