Totalling records with same date

ismith

Registered User.
Local time
Today, 21:46
Joined
Dec 14, 2011
Messages
30
Hello,

Ive got an order table with a few fields one of them being 'Paid' and one being PaymentDate

Paid is the amount someone has made a payment for
PaymentDate is the date the payment was processed.

Now what im trying to make is a End of Day Total page which will Sum up all the payments made on the current date.

Now ive created a query from my order table which displays all the orders that made a payment today and the Paid field is greater than 0.

Ive tried this code but its not working.

EndofDayTotal is my query that I have created which shows the payments on todays date.

Code:
SELECT SUM(Paid) FROM EndofDayTotal;

Ive got a txtTotal unbound text field which im trying to populate with the SUM of 'Paid'

can anyone help please?

Thanks..
 
Thanks for that mate.
 
Alternatively.....
If I have understood correctly, your page is already filtered with date. If it is so, you can use "=SUM(Paid)" in control source property of your txtTotal. You may have to use nz() with "0", if there is possibility of null value.....
 
Even better if you can use the below formula in control source. you can use as many conditions as possible.

DSum(ColumnPaid, TableName, Criteria<<paiddate=todaysdate>>)
 

Users who are viewing this thread

Back
Top Bottom