HELP WITH AGGREGATE FUNCTION

A

Alisheba

I'm having a terrible time figuring this one out and I was hoping someone can
help me out. I'm trying to capture the sum of all items that are between 31
to 60 days here's my query(Parameter) entry:

31-59: IIf([Age] Between 31 And 59,[tblSAP EXCEL DOWNLOAD]![Amount in Local
Cur],0)

Where Age refers to the following aggregate function on the same query:
Age: DateDiff("d",[tblSAP EXCEL DOWNLOAD]![Net Due Date],Now())

Criteria for AGE, Between CInt([From Age]) And CInt([To Age])

This works when their's no totals involved, as soon as I want to run with
totals, I get an error message.

Anyone that can help I would really appreciated.
 
J

John Spencer

I would try including the original expression in place of [Age]

31-59: IIf(DateDiff("d",[tblSAP EXCEL DOWNLOAD]![Net Due Date],Now())
Between 31 And 59,[tblSAP EXCEL DOWNLOAD]![Amount in Local Cur],0)



'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top