Supressing a Zero Value Field

M

Mike Abbott

I am using a simple parameter query to create a report of expenses.

One of the fields in the report is Chqno
for the rare occasions when I do pay by cheque.

Most of the values in the chqno field are zero and I would like to be able
to suppress the display of the zero.

I tried adding the following to the criteria in the query but it didn't
work.

If([chqno]>0,[chqno]," ")

Am I trying at the right point, or is there a report option that suppresses
zero fields?

Mike
 
G

Guest

Use IIF and not IF.

IIf([chqno] Is Null , "".[chqno])
OR
IIf([chqno] Is Not Null,[chqno],"")
 
F

fredg

I am using a simple parameter query to create a report of expenses.

One of the fields in the report is Chqno
for the rare occasions when I do pay by cheque.

Most of the values in the chqno field are zero and I would like to be able
to suppress the display of the zero.

I tried adding the following to the criteria in the query but it didn't
work.

If([chqno]>0,[chqno]," ")

Am I trying at the right point, or is there a report option that suppresses
zero fields?

Mike

No fancy expression needed.
Set the Control's Format property to:
#;-#;"";
 
M

Mike Abbott

fredg said:
I am using a simple parameter query to create a report of expenses.

One of the fields in the report is Chqno
for the rare occasions when I do pay by cheque.

Most of the values in the chqno field are zero and I would like to be able
to suppress the display of the zero.

I tried adding the following to the criteria in the query but it didn't
work.

If([chqno]>0,[chqno]," ")

Am I trying at the right point, or is there a report option that suppresses
zero fields?

Mike

No fancy expression needed.
Set the Control's Format property to:
#;-#;"";

Thanks for the replies,

The format answer worked fine for me this time around.

I can see a use for the IIf coding later on as I become more familiar with
access.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top