View Full Version : how to do this in report


mikarsen
09-12-2006, 05:05 AM
Attached image is my sample table in ms access 2000.

how can I make a report that would show the fields that only have "2'" value.

My goal output for my report would sumethin like this...

BRANCH: MALATE
OSA: 11
RSC: 2

BRANCH: MALATE
OSA: 13
CLAMP: 2

BRANCH: MALATE
OSA: 14
CLAMP: 2
RSC: 2

BRANCH: CAINTA
OSA: 15
RSC: 2
CLAMP: 2
EXPOSED: 2
METER FIXED: 2

... and so on.

I hope u got what I'm trying to output in my report. I only need the fields with the "2" value to be showed on the report.

Thanks in advance

Michael J Ross
09-13-2006, 12:45 AM
Create a query and base your report on the query.

Put 2 as your criteria using the Or Lines under RSC, Clamp etc.

mikarsen
09-13-2006, 05:45 AM
thanks for the response... I already tried using the OR criteria on the query. But ,when i print the report the output would show the corresponding values of the fields that has 1 or 3 value. I need the report to hide the fields that contain 1 & 3 value or make it invisible.

pls help. thanks.

Michael J Ross
09-14-2006, 12:06 AM
Right sorry misread what you wanted, you'll need to add some coding like below to the On Print event of your detail section, Me.nameoftextcontrol below refers to thye text box that holds the value of RSC, Clamp etc

If Me.nameoftextcontrol <> 2 Then
Me.nameoftextcontrol.Visisble = False
End If