Zero to print on report

G

Guest

I have a report with 8 columns across. We enter information into the fields
in columns 1 through 6.

Total of column 1 through 6 is automatically calculated into column 7
Total of column 2 through 6 is automatically calculated into column 8

When information is entered into any of the columns 2 through 6, leaving $0
value in column 1, column 8 is blank. How can I get the $0.00 total to print
on my report
 
G

Guest

You are not entering data in columns on a report! What are you really doing?
The reason column 8 is blank when nothing is entered in column 1 is because
column 1 is Null. The result of any calculation that includes a Null is Null:

1 + 5 = 6
1 + 5 + Null = Null

Use the Nz function on all your columns. So the control source for column 1
would be something like
=Nz([Column1Field],0)
 
G

Guest

Thank you...but I just figured it out. When I first designed the database, I
wrote a code to have the zeros not appear on a report. I just deleted the
following code from the two fields:

If Me!SALESPROJECTIONS = 0 Then
Me!SALESPROJECTIONS.Visible = 0
Else
Me!SALESPROJECTIONS.Visible = -1
End If

If Me!PROJECTEDAMOUNT = 0 Then
Me!PROJECTEDAMOUNT.Visible = 0
Else
Me!PROJECTEDAMOUNT.Visible = -1
End If

Thank you,

Klatuu said:
You are not entering data in columns on a report! What are you really doing?
The reason column 8 is blank when nothing is entered in column 1 is because
column 1 is Null. The result of any calculation that includes a Null is Null:

1 + 5 = 6
1 + 5 + Null = Null

Use the Nz function on all your columns. So the control source for column 1
would be something like
=Nz([Column1Field],0)
--
Dave Hargis, Microsoft Access MVP


R Marko said:
I have a report with 8 columns across. We enter information into the fields
in columns 1 through 6.

Total of column 1 through 6 is automatically calculated into column 7
Total of column 2 through 6 is automatically calculated into column 8

When information is entered into any of the columns 2 through 6, leaving $0
value in column 1, column 8 is blank. How can I get the $0.00 total to print
on my report
 

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