View Full Version : Identifying Records not to show on a report


RichB
07-12-2001, 09:39 AM
I have a query with an expression that adds two fields. When I print the report I do not want the records that contain a 0(zero). I have looked at IsNull but it does not work due to the fact that there is still a 0 in the field. Any help on excluding records on a report?

[This message has been edited by RichB (edited 07-12-2001).]

Rich
07-12-2001, 11:14 AM
Put >0 in the criteria grid howevever if your working with negative values then put <>0
HTH

Talismanic
07-12-2001, 11:30 AM
I might be misunderstanding your question but you can use the NZ function , I think it stands for Null Zero. It will give you a blank field but still treat it as a 0


Total = (Nz(.FirstField, 0) + Nz(.SecondField, 0)

RichB
07-12-2001, 05:44 PM
Sorry, my explaination has much to be desired. Let me try this;I have an unlinked calculated field on my report that will turn out a number. I do not want this record to show up if the field contains a zero. No negatives to consider.
I tried the Total = (Nz(.firstfield, 0)+ Nz(.SecondField, 0) and it turned all fields to Null not just the fields with 0. Hope this explains it better.

Rich
07-13-2001, 05:35 AM
Try in the on Format Event
If Me.YourField =0 Then
Me.YourField.Visible=False
Else
Me.YourField.Visible=True
End If
HTH

RichB
07-13-2001, 08:30 AM
Thanks, Rich, your last input helped.