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
Marshall Barton - 24 Jul 2007 17:19 GMT
>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
[quoted text clipped - 3 lines]
>=Sum([WorkTimeAmount])
>How do I go about limiting the summing to only billable?
=Sum(IIf([billable field], [amount field], 0))

Signature
Marsh
MVP [MS Access]
Dale Fye - 24 Jul 2007 17:20 GMT
Assuming your billable fieldname is "Billable", try something like:
=Sum(Abs([Billable]) * [WorkTimeAmount])
HTH
Dale

Signature
Email address is not valid.
Please reply to newsgroup only.
> 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
[quoted text clipped - 5 lines]
> Thanks in advance for the help.
> ... John
JohnE - 24 Jul 2007 17:36 GMT
Thanks to you both as both examples worked.
>>> John
> 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
[quoted text clipped - 5 lines]
> Thanks in advance for the help.
> ... John