Apr 28, 2004 #1 firsttube Technical User Joined Apr 21, 2004 Messages 165 Location 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
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
Apr 28, 2004 #2 THWatson Technical User Joined Apr 25, 2000 Messages 2,601 Location CA 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 Upvote 0 Downvote
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
Apr 28, 2004 Thread starter #3 firsttube Technical User Joined Apr 21, 2004 Messages 165 Location CA 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 Upvote 0 Downvote
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
Apr 28, 2004 #4 dhookom Programmer Joined Jun 24, 2003 Messages 22,561 Location US Try: Me.ControlName.Visible = Me.ControlName <> 0 Duane MS Access MVP Find out how to get great answers faq219-2884. Upvote 0 Downvote
Try: Me.ControlName.Visible = Me.ControlName <> 0 Duane MS Access MVP Find out how to get great answers faq219-2884.