#Name? in field on form when all feilds used in calcs are defined

  • Thread starter Thread starter MMJII
  • Start date Start date
M

MMJII

Hello all,
Ant ideas are appreciated.

I have a query below bound to a field in a form

=IIf(Sum([BillableHours]*[BillingRate]=0),0,Sum([Hours purchased on invoice]
* [Billing Rate]))
when I display the form the field has #Name? in it.

When I just place Sum([BillableHours]*[BillingRate]), or Sum([Hours
purchased on invoice] * [Billing Rate]) I get the proper values in the
field. I can't understand what I am doing wrong when I combine them

Basically

If Sum([BillableHours]*[BillingRate]=0 I want the field to equal
Sum([Hours purchased on invoice] * [Billing Rate]), or "0"

Thanks for any ideas

MMJ II
 
I believe you have a misplaced closing parenthesis for the Sum function. Try
this:

=IIf(Sum([BillableHours]*[BillingRate])=0,0,Sum([Hours purchased on invoice]
* [Billing Rate]))
 
Back
Top