Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query to calculate balance over 30days old 1

Status
Not open for further replies.

monkeysee

Programmer
Sep 24, 2002
201
0
0
US
I'd like to have a report based on a query that will calculate balance owed over 30 days old...This is what my query is so far: I know there should be a datediff expression somewhere, but don't know where and how to express it.

SELECT AerationInvoice.ClientID, AerationInvoice.DateBilled, Sum(Fees.FeeAmount) AS SumOfFeeAmount, Sum(AerationInvoice.AmountPaid) AS SumOfAmountPaid
FROM AerationInvoice INNER JOIN Fees ON AerationInvoice.FeeID = Fees.FeeID
GROUP BY AerationInvoice.ClientID, AerationInvoice.DateBilled
ORDER BY AerationInvoice.ClientID
WITH OWNERACCESS OPTION;


I also would like the report to be able to show the outstanding balance and list any additional charges, with a grand total due. Would this be accomplished with a sub report?


Thanks in advance!!!!
 
Like this ?
WHERE AerationInvoice.DateBilled<(Date()-30)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top