How do i hide #Num! errors in Access 2007?


G

Guest

I'm using access 2007. In a report I am getting #Num! errors.
I know it's caused by trying to devide a number by zero. But how do I hide
the error?
I know how to do this in excel but nor access
 
Ad

Advertisements

C

Carl Rapson

JemBlack said:
I'm using access 2007. In a report I am getting #Num! errors.
I know it's caused by trying to devide a number by zero. But how do I hide
the error?
I know how to do this in excel but nor access

I don't think you can hide it, but you can allow for it. Anywhere there's a
possibility of dividing by zero, use an IIf statement:

IIf ([somefield]=0, 0, [someotherfield]/[somefield])

Carl Rapson
 
G

Guest

You can do the same thing in Access you do in Excel. You can use the ISERROR
function something like if(iserror())
 
G

Guest

Carl Rapson said:
JemBlack said:
I'm using access 2007. In a report I am getting #Num! errors.
I know it's caused by trying to devide a number by zero. But how do I hide
the error?
I know how to do this in excel but nor access

I don't think you can hide it, but you can allow for it. Anywhere there's a
possibility of dividing by zero, use an IIf statement:

IIf ([somefield]=0, 0, [someotherfield]/[somefield])

Carl Rapson


Carl,

Thanks for your help. Just so I know i'm doing this right, can you translate
this into the required formula please....

=[CountOfWON DOUBLES?]/[CountOfPLAYED DOUBLES?]

It's set to show as a percentage

Cheers,
Jem
 
C

Carl Rapson

JemBlack said:
Carl Rapson said:
JemBlack said:
I'm using access 2007. In a report I am getting #Num! errors.
I know it's caused by trying to devide a number by zero. But how do I
hide
the error?
I know how to do this in excel but nor access

I don't think you can hide it, but you can allow for it. Anywhere there's
a
possibility of dividing by zero, use an IIf statement:

IIf ([somefield]=0, 0, [someotherfield]/[somefield])

Carl Rapson


Carl,

Thanks for your help. Just so I know i'm doing this right, can you
translate
this into the required formula please....

=[CountOfWON DOUBLES?]/[CountOfPLAYED DOUBLES?]

It's set to show as a percentage

Cheers,
Jem

=IIf([CountOfPLAYED DOUBLES?]=0, 0, [CountOfWON DOUBLES?]/[CountOfPLAYED
DOUBLES?])

If [CountOfPLAYED DOUBLES] is zero, your percentage should show as 0% (the
middle parameter). You can modify this to show whatever you want there.

Carl Rapson
 
Ad

Advertisements

G

Guest

THANKS FOR YOUR HELP... WORKED A TREAT.

Carl Rapson said:
JemBlack said:
Carl Rapson said:
I'm using access 2007. In a report I am getting #Num! errors.
I know it's caused by trying to devide a number by zero. But how do I
hide
the error?
I know how to do this in excel but nor access

I don't think you can hide it, but you can allow for it. Anywhere there's
a
possibility of dividing by zero, use an IIf statement:

IIf ([somefield]=0, 0, [someotherfield]/[somefield])

Carl Rapson


Carl,

Thanks for your help. Just so I know i'm doing this right, can you
translate
this into the required formula please....

=[CountOfWON DOUBLES?]/[CountOfPLAYED DOUBLES?]

It's set to show as a percentage

Cheers,
Jem

=IIf([CountOfPLAYED DOUBLES?]=0, 0, [CountOfWON DOUBLES?]/[CountOfPLAYED
DOUBLES?])

If [CountOfPLAYED DOUBLES] is zero, your percentage should show as 0% (the
middle parameter). You can modify this to show whatever you want there.

Carl Rapson
 
Ad

Advertisements


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