Karen wrote:
I have created a query that calculates the expected payment date of
receivables based on an average of past payment.
I would like to run a report from this information that lists the
receiveables by Expected Date in coming 10 days, 30 days, etc.
How do I set a range for this? Is it done in the query or the report?
Somehow you need to set a grouping to your query. This is one method, you
can figure out alternative methods. Let's assume the query for the report
is called Expected. Create a new query, drop in Expected as the
query/table. Add a new column. Call it ExpectedGroup that calls a
function ReturnGroup. Ex:
ExpectedGroup : ReturnGroup(ExpectedDt)
In a module, create the function
Public Function ReturnGroup(datExpected As Date) As Integer
Select Case DateDiff("d",Date(),datExpected)
Case Is <= 10
ReturnGroup = 1
Case Is <= 30
ReturnGroup = 2
Case Else
ReturnGroup = 3
End Select
End Function
Now you can break and sort and filter on the group numbers..