#Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a right join in a query. When there isn't any join on the right side I
want a zero placed in the column. I am using Access 2003. I have tried the
following:


In one column I have

ConvertNulls: IIf(IsNull([AvgOfProductScore]),0,[AvgOfProductScore]).

This returns a zero where needed in this column. It also returns the proper
number [AvgOfProductScore] where there is a join.

Then I have a column to the right for formatting purposes.

ProdScoreAvg: Str(Format([ConvertNulls],"#.##")) & " %"

It is this column that gives me the #Error condition where there isn't a
match. Any ideas would be greatly appreciated.
 
To make it shorter using the Nz function to replace Null with 0
ConvertNulls: IIf(IsNull([AvgOfProductScore]),0,[AvgOfProductScore])

Can be
ConvertNulls: Nz([AvgOfProductScore],0)

Instead of using the new field, use the formula from above
ProdScoreAvg: CStr(Format(Nz([AvgOfProductScore],0),"#.##")) & " %"
 
Back
Top