summing expression

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
 
M

Marshall Barton

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))
 
G

Guest

Assuming your billable fieldname is "Billable", try something like:


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

HTH
Dale
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top