T
TMaxwell
Here is my Statement in SQL View. I need to have a sum for Fields Current,
[1-30], [31-60], [61-90],[91-180], [181-360], [360+]. From what I understand
it should be (Sum([Current]) It will not work. I am getting frustrated. As I
run my different queries, I need to export them to Excel on the desktop.
Please Help
Todd
SELECT
ALL_AGINGS_AR.[co-number], ALL_AGINGS_AR.[divn-number],
ALL_AGINGS_AR.[cust-number], ALL_AGINGS_AR.[cust-name],
ALL_AGINGS_AR.[due-date], ALL_AGINGS_AR.TranType, ALL_AGINGS_AR.[ref-number],
ALL_AGINGS_AR.[as-of-date], ALL_AGINGS_AR.[item-amount], ALL_AGINGS_AR.Today,
[Today]-[due-date] AS DSO,
IIf([DSO]<=30,[item-amount],0) AS [Current],
IIf([DSO]<=1 And [DSO]>=31,[item-amount],0) AS [1-30],
IIf([DSO]<=60 And [DSO]>=31,[item-amount],0) AS [31-60],
IIf([DSO]<=90 And [DSO]>=61,[item-amount],0) AS [61-90],
IIf([DSO]<=180 And [DSO]>=91,[item-amount],0) AS [91-180],
IIf([DSO]<=365 And [DSO]>=181,[item-amount],0) AS [181-360],
IIf([DSO]>=366,[item-amount],0) AS [360+],
ALL_AGINGS_AR.CM, ALL_AGINGS_AR.CA, ALL_AGINGS_AR.[Internal/External]
FROM ALL_AGINGS_AR
WHERE (((ALL_AGINGS_AR.[co-number])=[Which Branch do you want data for?])
AND ((ALL_AGINGS_AR.[cust-number])=[Enter Customer number]))
ORDER BY ALL_AGINGS_AR.[co-number], ALL_AGINGS_AR.[divn-number],
ALL_AGINGS_AR.[cust-number], ALL_AGINGS_AR.[as-of-date];
[1-30], [31-60], [61-90],[91-180], [181-360], [360+]. From what I understand
it should be (Sum([Current]) It will not work. I am getting frustrated. As I
run my different queries, I need to export them to Excel on the desktop.
Please Help
Todd
SELECT
ALL_AGINGS_AR.[co-number], ALL_AGINGS_AR.[divn-number],
ALL_AGINGS_AR.[cust-number], ALL_AGINGS_AR.[cust-name],
ALL_AGINGS_AR.[due-date], ALL_AGINGS_AR.TranType, ALL_AGINGS_AR.[ref-number],
ALL_AGINGS_AR.[as-of-date], ALL_AGINGS_AR.[item-amount], ALL_AGINGS_AR.Today,
[Today]-[due-date] AS DSO,
IIf([DSO]<=30,[item-amount],0) AS [Current],
IIf([DSO]<=1 And [DSO]>=31,[item-amount],0) AS [1-30],
IIf([DSO]<=60 And [DSO]>=31,[item-amount],0) AS [31-60],
IIf([DSO]<=90 And [DSO]>=61,[item-amount],0) AS [61-90],
IIf([DSO]<=180 And [DSO]>=91,[item-amount],0) AS [91-180],
IIf([DSO]<=365 And [DSO]>=181,[item-amount],0) AS [181-360],
IIf([DSO]>=366,[item-amount],0) AS [360+],
ALL_AGINGS_AR.CM, ALL_AGINGS_AR.CA, ALL_AGINGS_AR.[Internal/External]
FROM ALL_AGINGS_AR
WHERE (((ALL_AGINGS_AR.[co-number])=[Which Branch do you want data for?])
AND ((ALL_AGINGS_AR.[cust-number])=[Enter Customer number]))
ORDER BY ALL_AGINGS_AR.[co-number], ALL_AGINGS_AR.[divn-number],
ALL_AGINGS_AR.[cust-number], ALL_AGINGS_AR.[as-of-date];