# Zero's in reports

T

#### Tony Williams

Sorry posted this in Form group instead of here.
I have a number of calculated controls ona report. If any of the fields
contain a "0" I get #Num!
This is a typical control
=([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot]
I have tried using the Nz function like this
=NZ([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot],0)
but it doesn't work. I've also tried
=NZ(([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot]),0)
But get a syntax error with the extra set of brackets.
What am I doing wrong?
Thanks
Tony

G

#### Gina Whipp

Try:

=Nz(([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot],0)

HTH,
Gina

T

#### Tony Williams

Tried that and still get #Num!
Any ideas?
Tony
Gina Whipp said:
Try:

=Nz(([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot],0)

HTH,
Gina

Tony Williams said:
Sorry posted this in Form group instead of here.
I have a number of calculated controls ona report. If any of the fields
contain a "0" I get #Num!
This is a typical control
=([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot]
I have tried using the Nz function like this
=NZ([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot],0)
but it doesn't work. I've also tried
=NZ(([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot]),0)
But get a syntax error with the extra set of brackets.
What am I doing wrong?
Thanks
Tony

B

#### BruceM

You have an exchange on this in the formscoding group. I realize you posted
there in error, but you are receiving assistance in that thread. It is best
to keep just one thread going on a topic. If you get an answer it doesn't
matter that the question was posted in the wrong group. You specified that
you are working on a report; the responder in formscoding understood that.

Tony Williams said:
Tried that and still get #Num!
Any ideas?
Tony
Gina Whipp said:
Try:

=Nz(([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot],0)

HTH,
Gina

Tony Williams said:
Sorry posted this in Form group instead of here.
I have a number of calculated controls ona report. If any of the fields
contain a "0" I get #Num!
This is a typical control
=([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot]
I have tried using the Nz function like this
=NZ([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot],0)
but it doesn't work. I've also tried
=NZ(([Sum Of txtClients500]*[txtclientstotal])/[Sum Of
txtClientsTot]),0)
But get a syntax error with the extra set of brackets.
What am I doing wrong?
Thanks
Tony

T

#### Tony Williams

Thanks Bruce saw your comment in the other group.
Tony
BruceM said:
You have an exchange on this in the formscoding group. I realize you
posted there in error, but you are receiving assistance in that thread.
It is best to keep just one thread going on a topic. If you get an answer
it doesn't matter that the question was posted in the wrong group. You
specified that you are working on a report; the responder in formscoding
understood that.

Tony Williams said:
Tried that and still get #Num!
Any ideas?
Tony
Gina Whipp said:
Try:

=Nz(([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot],0)

HTH,
Gina

Sorry posted this in Form group instead of here.
I have a number of calculated controls ona report. If any of the fields
contain a "0" I get #Num!
This is a typical control
=([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot]
I have tried using the Nz function like this
=NZ([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot],0)
but it doesn't work. I've also tried
=NZ(([Sum Of txtClients500]*[txtclientstotal])/[Sum Of
txtClientsTot]),0)
But get a syntax error with the extra set of brackets.
What am I doing wrong?
Thanks
Tony

G

#### Gina Whipp

This indicates there is a problem in the calculation. What figure does Sum
Of txtClients500 equal to... Same question for the other fields. AND are
these fields in a query or on a form? If you are referencing a form you may
have to use Me! OR [NameOfForm]![NameOfField]

Tony Williams said:
Tried that and still get #Num!
Any ideas?
Tony
Gina Whipp said:
Try:

=Nz(([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot],0)

HTH,
Gina

Tony Williams said:
Sorry posted this in Form group instead of here.
I have a number of calculated controls ona report. If any of the fields
contain a "0" I get #Num!
This is a typical control
=([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot]
I have tried using the Nz function like this
=NZ([Sum Of txtClients500]*[txtclientstotal])/[Sum Of txtClientsTot],0)
but it doesn't work. I've also tried
=NZ(([Sum Of txtClients500]*[txtclientstotal])/[Sum Of
txtClientsTot]),0)
But get a syntax error with the extra set of brackets.
What am I doing wrong?
Thanks
Tony