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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting Days in Access- How to do it?

Status
Not open for further replies.

Regulluz

Technical User
Jun 14, 2002
129
PR
Hello All....

After a lot of work in a database for accounts billings, my boss now wants to see how long the customers took to pay. While I was just tracking if they paid or not, now I have to make Access to count the days from the Invoice date up to the date the invoice is paid. I have a customers, invoices, and suppliers tables. In suppliers there's a terms field, which says the terms of payment, but I have not taken advantage of it. Every table is linked by its current ID, where Customers to Invoices by CustID and Suppliers to Invoices by SupplID. InvoiceNumber is the primary key for Invoices, and, then I'm running 20 queries around those tables, and 3 reports of those 20 queries. None of them shows how long it took for customers to pay. Now, the Invoices table does have an Invoice Date and a Due date based in the terms, which I count myself and add the date based in my calculations. The question is, How do I make acces to count the days and make a report with the outcome?

Sorry for the looooooong parragraph. Thanks anticipated.

reg
 
You have an [Invoice Date] field shown but I didn't see a [Date Paid] field.

Just make a query to base your report on that includes something like this:

"SELECT Customers.CustomerName, Invoices.[Date Paid] - [Invoice Date] As TotalDaysToPay FROM Customers INNER JOIN Invoices ON Customers.CustID = Invoices.CustID GROUP BY Customers.CustomerName, Invoices.[Date Paid] - [Invoice Date];"

Good Luck,

VBSlammer
redinvader3walking.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top