Sum to get total

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
 
J

John W. Vinson

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])
 
A

Andrew C

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

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

Top