Sum to get total

  • Thread starter Thread starter Andrew C
  • Start date Start date
A

Andrew C

I have a continous form that has three fields, ITEMS, AMOUNT, PAID BY
The only two options available in the PAID BY field are CASH and EFTPOS.

In the footer of my form i have a text box that gives me a total for the day
sales. I also want to calculate a total for Amounts paid by cash, and a
total paid by eftpos

Is this possible and how can i do it??

Thanks in advance for your help
 
I have a continous form that has three fields, ITEMS, AMOUNT, PAID BY
The only two options available in the PAID BY field are CASH and EFTPOS.

In the footer of my form i have a text box that gives me a total for the day
sales. I also want to calculate a total for Amounts paid by cash, and a
total paid by eftpos

Is this possible and how can i do it??

Thanks in advance for your help

The simplest solution would be to open the Form's Recordsource query (or open
the table and accept Access offer to make it a query). Add two calculated
fields by typing:

CashPayment: IIF([Paid By] = "Cash", [Amount], 0)
EFTPOSPayment: IIF([Paid By] = "EFTPOS", [Amount], 0)

Note that if Paid By is NULL, or has some other value, both these fields will
be Null.

You can then put two textboxes on the form footer, having control sources

=Sum([CashPayment])
=Sum([EFTPOSPayment])
 
Thanks John Works Great

John W. Vinson said:
I have a continous form that has three fields, ITEMS, AMOUNT, PAID BY
The only two options available in the PAID BY field are CASH and EFTPOS.

In the footer of my form i have a text box that gives me a total for the day
sales. I also want to calculate a total for Amounts paid by cash, and a
total paid by eftpos

Is this possible and how can i do it??

Thanks in advance for your help

The simplest solution would be to open the Form's Recordsource query (or open
the table and accept Access offer to make it a query). Add two calculated
fields by typing:

CashPayment: IIF([Paid By] = "Cash", [Amount], 0)
EFTPOSPayment: IIF([Paid By] = "EFTPOS", [Amount], 0)

Note that if Paid By is NULL, or has some other value, both these fields will
be Null.

You can then put two textboxes on the form footer, having control sources

=Sum([CashPayment])
=Sum([EFTPOSPayment])
 
Back
Top