Ms Access Error Division By Zero
message if there is > zero's in the [proc1] field and the [rtn 1] field. > > I want it to show 0.00% if [rtn 1] = 0 and [proc1]=0 > So the expression in a calculated field in query could be as follows: IIf(Nz([proc1],0)=0,0,Nz([rtn 1],0)/[Proc1]) John Spencer Access MVP 2002-2005, 2007-2009 The Hilltop Institute University of Maryland Baltimore County Duane Hookom bye, Bart "Wayne Morgan"
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! thank you in advance for you help. Try something like this: =IIf([Field2] = 0,"",[Field1]/[Field2]) -- Fred Please respond only to this newsgroup. Forum Board FAQ Forum Rules Guidelines for Forum Use FAQ Forum Actions Mark Forums Read Quick Links Today's Posts Search New Posts Zero Reply Posts Subscribed Threads MrExcel Consulting Advanced Search
There are sometimes Zero's > > in Ext Price Compare 1 and sometimes there are zero's in Ext Price Compare 2, > > so for example: > > Ext Price Compare Although, if it was a spelling error, I would expect the query to prompt for the item as a parameter. I would replace the "" with Null. > > =IIf(Nz([Ext Price Compare 1],0)=0 or Nz([Ext Price Compare > 2]),0)=0,Null,([Ext Price Compare 1]/[Ext Price Compare 2])-1) > John Spencer, May 14, Ms Access Iferror Kryst51 View Public Profile Find More Posts by Kryst51