Solved

Aging Report

Posted on 1998-08-29
5
525 Views
Last Modified: 2006-11-17
How do I create an aging report in V8?
0
Comment
Question by:rtstannard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 1

Expert Comment

by:rene_moeller
ID: 1960652
Could you be a bit more specific?
0
 
LVL 4

Accepted Solution

by:
tomook earned 100 total points
ID: 1960653
The general technique is to add a calculated field to a query which determines the "bucket" for each record, then run GROUP BY on that field. To make this simple, you can use two queries, one to calculate the bucket and a second to group.

For example, given the tables and fields:
Customers
   CustID
   CustName
Invoices
   InvID
   CustID
   AmountDue
   Age

Make Query1:
SELECT InvID, CustID, AmountDue, Age,
IIF(Age <= 30, "Current", IIF((Age > 30) And (Age <= 60) , "30-60", "Over 60") As AgingBucket
FROM Invoices;

And Query2:
SELECT CustID, Sum(AmountDue) As BucketTotal, AgingBucket
FROM Query1
GROUP BY CustID, AgingBucket;

0
 
LVL 4

Expert Comment

by:tomook
ID: 1960654
I should note that you can structure things a little differently, which helps you print standard invoices or statements.

Query1:
SELECT InvID, CustID, AmountDue,
  IIf(Age<=30, AmountDue, 0.0) As BucketCurrent,
  IIf((Age>30) And (Age<=60), AmountDue, 0.0) As Bucket30,
  IIf((Age>60) And (Age<=90), AmountDue, 0.0) As Bucket60,
  IIf(Age>90, AmountDue, 0.0) As BucketOver90
FROM Invoices;

Query2:
SELECT CustID,
  Sum(BucketCurrent) As BucketCurrentTotal,
  Sum(Bucket30) As Bucket30Total,
  Sum(Bucket60) As Bucket60Total,
  Sum(BucketOver90) As BucketOver90Total
FROM Query1
GROUP BY CustID;

Query2 will show you one record per customer, which makes certain reports easier to write.
0
 

Author Comment

by:rtstannard
ID: 1960655
tomook:  Thanks for a full, understandable, and syntactically correct answer.  Good work!


0
 
LVL 4

Expert Comment

by:tomook
ID: 1960656
I am glad there were no syntax errors as I just typed it in cold. Thanks.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question