I think that may still error. Since I believe that when you use IIF as
an expression in a control (as opposed to using it in a query) both the
True and the False argument are evaluated. So you might have to use
something along the lines of the following to keep the division from
generating an error.
=IIf(Nz([Ext Price Compare 1],0)=0
or Nz([Ext Price Compare 2],0)=0
, Null
,([Ext Price Compare 1]/
IIF([Ext Price Compare 2]=0,1,[Ext Price Compare 2))-1)
'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
Duane said:
I don't care for IIf() or any other expressions that could return two
different data types. 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)