467,081 Members | 1,194 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,081 developers. It's quick & easy.

division by zero

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
  • viewed: 8643
Share:
6 Replies
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
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
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
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
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
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.

Similar topics

1 post views Thread by florian.boldt@itgain.de | last post: by
9 posts views Thread by Marcin | last post: by
16 posts views Thread by Greg Donald | last post: by
2 posts views Thread by subnunciation@gmail.com | last post: by
2 posts views Thread by Pakna | last post: by
94 posts views Thread by krypto.wizard@gmail.com | last post: by
9 posts views Thread by Joe Cool | last post: by
2 posts views Thread by cobolman | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.