summing expression

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

Guest

I have a subform that in the footer has a txtbox that sums up a field. This
works fine. But I need to have another txtbox in the footer sum up the same
field but only if it is billable. The subform does have a checkbox on it to
indicate billable or not. I am stumped in how to create the expression for
this and seek help from the group. Here is the current sum expression.
=Sum([WorkTimeAmount])
How do I go about limiting the summing to only billable?
Thanks in advance for the help.
.... John
 
JohnE said:
I have a subform that in the footer has a txtbox that sums up a field. This
works fine. But I need to have another txtbox in the footer sum up the same
field but only if it is billable. The subform does have a checkbox on it to
indicate billable or not. I am stumped in how to create the expression for
this and seek help from the group. Here is the current sum expression.
=Sum([WorkTimeAmount])
How do I go about limiting the summing to only billable?


=Sum(IIf([billable field], [amount field], 0))
 
Assuming your billable fieldname is "Billable", try something like:


=Sum(Abs([Billable]) * [WorkTimeAmount])

HTH
Dale
 
Thanks to you both as both examples worked.

JohnE said:
I have a subform that in the footer has a txtbox that sums up a field. This
works fine. But I need to have another txtbox in the footer sum up the same
field but only if it is billable. The subform does have a checkbox on it to
indicate billable or not. I am stumped in how to create the expression for
this and seek help from the group. Here is the current sum expression.
=Sum([WorkTimeAmount])
How do I go about limiting the summing to only billable?
Thanks in advance for the help.
... John
 
Back
Top