A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

HELP WITH AGGREGATE FUNCTION



 
 
Thread Tools Display Modes
  #1  
Old July 12th, 2008, 04:51 AM posted to microsoft.public.access.queries
Alisheba
external usenet poster
 
Posts: 3
Default HELP WITH AGGREGATE FUNCTION

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.



  #2  
Old July 12th, 2008, 11:44 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 2,364
Default HELP WITH AGGREGATE FUNCTION

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
'================================================= ===


Alisheba wrote:
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.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.