Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#Error resullts from a query

Status
Not open for further replies.

opkpapp11

Programmer
Jan 31, 2008
9
0
0
US
Hello,

I made a custom column in my query that adds two colmuns and then divides by another. The problem is sometimes that column dividing is zero thus i get an "#Error" as the column data.

Does anyone know how to fix this? I would like it to just show up as 0 rather then #Error


AHT: ([SumOfacdtime]+[SumOfacwtime])/[SumOfacdcalls]
 
I think this should work.

AHT: iif ([SumOfacdcalls] <> 0,([SumOfacdtime]+[SumOfacwtime])/[SumOfacdcalls]),0)
 
Oops,

I think
AHT: iif ([SumOfacdcalls] <> 0,([SumOfacdtime]+[SumOfacwtime])/[SumOfacdcalls]),0)
is missing a bracket.

AHT: iif ([SumOfacdcalls] <> 0,([SumOfacdtime]+[SumOfacwtime])/([SumOfacdcalls]),0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top