Discussion Locked

Access Reports-Printing Columns Which Co

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am having trouble printing columns in access reports that have null values. I know how to replace null values with zeros using ISNull of IIFNUL. My challenge is that I CANNOT show zeros in my report.

5 replies

by mslizny

First, try using the Nz (null-to-zero) function instead of ISNull of IIFNUL. It works on so many calculations. To get zeros to show, you can put
NZ (Calculated value) on every calculated value.
Finally, in items like crosstab reports, you can force zeros for "empty" values by using the 'value if null' part of the NZ function to specify what to fill the "empty" values with. See Nz Function in MS Access help for details.
I discovered the Nz function in the first part of this year because I was struggling so much with IIF functions to get the same result. I discovered the 'value if null' part when I needed to put zero values in empty crosstab fields.
If you need more help, let me know

by mbarker734

Using MyNumber as the field name:

In the detail section of the report On Format property place:

Me!MyNumber.Visible = True

In the detail section of the report On Print property place:

If Me!MyNumber = 0 Then Me!MyNumber.Visible = False
With this you simply hide any zero value in the field MyNumber and thus zero's will not show on your report.

Hope this helps.

This discussion is closed to new replies.