By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,704 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,704 IT Pros & Developers. It's quick & easy.

division by zero

P: n/a
Hello,

i have a problem with a division by zero fault in my report trough a
query...

this is the expression in the query:

Name: Sum(IIF([diviser]=0,0,[fieldA]/[diviser]))

what is wrong with this expression?
(the query says: the expression has a illegal number (0,0,)

thank you!
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Right off hand, I would guess spelling error or missing table reference. If
you have more than one table in the query with the name of the field(s),
you'll need to specify the table (i.e., [table1].[diviser]). Although, if it
was a spelling error, I would expect the query to prompt for the item as a
parameter. Another possibility is that Name is a reserved word and should be
used as the field name.

--
Wayne Morgan
Microsoft Access MVP
"bart van deun" <vd*@pandora.be> wrote in message
news:oV**********************@phobos.telenet-ops.be...
Hello,

i have a problem with a division by zero fault in my report trough a
query...

this is the expression in the query:

Name: Sum(IIF([diviser]=0,0,[fieldA]/[diviser]))

what is wrong with this expression?
(the query says: the expression has a illegal number (0,0,)

thank you!

Nov 13 '05 #2

P: n/a
i do not find the problem

i got this solution, but still not working:

Expr1: IIf([Tbl]![Denominator]=0,"N/A",[Tbl]![Numerator]/[Tbl]![De
nominator])

if someone can help me out...

thank's

"Wayne Morgan" <co***************************@hotmail.com> wrote in message
news:Hs***************@newssvr33.news.prodigy.com. ..
Right off hand, I would guess spelling error or missing table reference. If you have more than one table in the query with the name of the field(s),
you'll need to specify the table (i.e., [table1].[diviser]). Although, if it was a spelling error, I would expect the query to prompt for the item as a
parameter. Another possibility is that Name is a reserved word and should be used as the field name.

--
Wayne Morgan
Microsoft Access MVP
"bart van deun" <vd*@pandora.be> wrote in message
news:oV**********************@phobos.telenet-ops.be...
Hello,

i have a problem with a division by zero fault in my report trough a
query...

this is the expression in the query:

Name: Sum(IIF([diviser]=0,0,[fieldA]/[diviser]))

what is wrong with this expression?
(the query says: the expression has a illegal number (0,0,)

thank you!


Nov 13 '05 #3

P: n/a
repeating the problem:

TotaalBakEtiket: Som([AantalStuks]/[AantalPerEenhedenBakEtiket])

i do not want the division by zero error from the query expression

thank you!

"bart van deun" <vd*@pandora.be> wrote in message
news:a5*********************@phobos.telenet-ops.be...
i do not find the problem

i got this solution, but still not working:

Expr1: IIf([Tbl]![Denominator]=0,"N/A",[Tbl]![Numerator]/[Tbl]![De
nominator])

if someone can help me out...

thank's

"Wayne Morgan" <co***************************@hotmail.com> wrote in message news:Hs***************@newssvr33.news.prodigy.com. ..
Right off hand, I would guess spelling error or missing table reference. If
you have more than one table in the query with the name of the field(s),
you'll need to specify the table (i.e., [table1].[diviser]). Although, if it
was a spelling error, I would expect the query to prompt for the item as
a parameter. Another possibility is that Name is a reserved word and

should be
used as the field name.

--
Wayne Morgan
Microsoft Access MVP
"bart van deun" <vd*@pandora.be> wrote in message
news:oV**********************@phobos.telenet-ops.be...
Hello,

i have a problem with a division by zero fault in my report trough a
query...

this is the expression in the query:

Name: Sum(IIF([diviser]=0,0,[fieldA]/[diviser]))

what is wrong with this expression?
(the query says: the expression has a illegal number (0,0,)

thank you!



Nov 13 '05 #4

P: n/a
You don't say "what" problem this is causing you. The equation looks ok.
That being the case, I'm going to guess that there is a References problem.
Please see this link.

http://members.iinet.net.au/~allenbrowne/ser-38.html

--
Wayne Morgan
MS Access MVP
"bart van deun" <vd*@pandora.be> wrote in message
news:A9**********************@phobos.telenet-ops.be...
repeating the problem:

TotaalBakEtiket: Som([AantalStuks]/[AantalPerEenhedenBakEtiket])

i do not want the division by zero error from the query expression

Nov 13 '05 #5

P: n/a
I found it!!

in report form:
Name: Sum(IIF([diviser]=0,0,[fieldA]/[diviser]))

in query:
Name: Sum(IIF([diviser]=0;0;[fieldA]/[diviser]))

My god, i searched for 3 hours for that!!

bye,
Bart

"Wayne Morgan" <co***************************@hotmail.com> wrote in message
news:zt***************@newssvr24.news.prodigy.com. ..
You don't say "what" problem this is causing you. The equation looks ok.
That being the case, I'm going to guess that there is a References problem. Please see this link.

http://members.iinet.net.au/~allenbrowne/ser-38.html

--
Wayne Morgan
MS Access MVP
"bart van deun" <vd*@pandora.be> wrote in message
news:A9**********************@phobos.telenet-ops.be...
repeating the problem:

TotaalBakEtiket: Som([AantalStuks]/[AantalPerEenhedenBakEtiket])

i do not want the division by zero error from the query expression


Nov 13 '05 #6

P: n/a
I'm glad that you found it. It must be a localazation item. In the US we use
commas in both places, not semicolons.

--
Wayne Morgan
MS Access MVP
"bart van deun" <vd*@pandora.be> wrote in message
news:PE**********************@phobos.telenet-ops.be...
I found it!!

in report form:
Name: Sum(IIF([diviser]=0,0,[fieldA]/[diviser]))

in query:
Name: Sum(IIF([diviser]=0;0;[fieldA]/[diviser]))

My god, i searched for 3 hours for that!!

bye,
Bart

"Wayne Morgan" <co***************************@hotmail.com> wrote in message news:zt***************@newssvr24.news.prodigy.com. ..
You don't say "what" problem this is causing you. The equation looks ok.
That being the case, I'm going to guess that there is a References

problem.
Please see this link.

http://members.iinet.net.au/~allenbrowne/ser-38.html

--
Wayne Morgan
MS Access MVP
"bart van deun" <vd*@pandora.be> wrote in message
news:A9**********************@phobos.telenet-ops.be...
repeating the problem:

TotaalBakEtiket: Som([AantalStuks]/[AantalPerEenhedenBakEtiket])

i do not want the division by zero error from the query expression



Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.