I have a report based on a query. some of the results in
the report come out as 0. I would like to change all 0
values to 1. please help!!
hi,
In your query header that has the zeros put this:
yourQueryfield:Iff([YourQueryFiled]=0,1,[YourQueryField])
>-----Original Message-----
>I have a report based on a query. some of the results in
>the report come out as 0. I would like to change all 0
>values to 1. please help!!
>.
Duane Hookom - 09 Jan 2005 21:00 GMT
Minor correction, the function is IIf() not Iff().
Since this is displayed in a text box, you could use the Format property to
change the display of 0 to 1.

Signature
Duane Hookom
MS Access MVP
> hi,
> In your query header that has the zeros put this:
[quoted text clipped - 5 lines]
>>values to 1. please help!!
>>.
instead of
SELECT myfield
say
SELECT iif(myfield<>0,myfield,1) as myfield_
the "as" clause is necessary so that the result field name is
unambiguous, so you will have to change your report to reference
myfield_ instead of myfield.
Hope this helps,
Tim
> I have a report based on a query. some of the results in
> the report come out as 0. I would like to change all 0
> values to 1. please help!!