Re: =Sum(Abs([field]="Value")*[Field]



You have a table of [Final Action] values with an additional field for
[ApplyCost] which stores 0 for all records other than "Approved", "Pending",
and "Obligated". These three records contain a 1 in the ApplyCost field.

Then add this table to your report's record source and join the [Final
Action] fields. Your final expression then becomes:
=Sum([Tuition Cost] * [ApplyCost])

Maintain tables, not expressions.

--
Duane Hookom
MS Access MVP


"gumby" <david.isaacks@xxxxxxxxxxx> wrote in message
news:1153870842.261652.260300@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I want to sum [Tuition Cost] but only if [Final Action] equals either
Approved, Pending, or Obligated. The control source below works fine. I
am just interested to find out if a easier way exists.

=Sum(Abs([Final Action]="Approved")*[Tuition Cost])+Sum(Abs([Final
Action]="Pending")*[Tuition Cost])+Sum(Abs([Final
Action]="Obligated")*[Tuition Cost])



Othe ways I have tried.

=Sum(Abs([Final Action]="Approved" And "Pending" And
"Obligated")*[Tuition Cost]

=Sum(Abs([Final Action]="Approved" And [Final Action]="Pending" And
[Final Action]="Obligated")*[Tuition Cost]



Thanks,
David



.



Relevant Pages

  • Re: Records not adding...Please help!
    ... When I say Control source = master Item ... What is the source for the operator query? ... bound to the table as the Record Source, the form is a bound form. ... Private Sub Category_AfterUpdate ...
    (microsoft.public.access.forms)
  • Re: Records not adding...Please help!
    ... When I say Control source = master Item ... Row souce in properties is called operator query ... bound to the table as the Record Source, the form is a bound form. ... Private Sub Category_AfterUpdate ...
    (microsoft.public.access.forms)
  • Re: Error 2465 after upgrading 2000 to 2002.
    ... This is a confirmed bug in SP-3. ... A form's record source has been changed, and at least one of the ... controls on the form is being referred to in VBA code by its control source, ... If your problem is caused by reason #1, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Records not adding...Please help!
    ... When I say Control source = master Item ... What is the source for the operator query? ... bound to the table as the Record Source, the form is a bound form. ...
    (microsoft.public.access.forms)
  • Re: Records not adding...Please help!
    ... When I say Control source = master Item ... What is the source for the operator query? ... bound to the table as the Record Source, the form is a bound form. ...
    (microsoft.public.access.forms)