A
AccessHelp
Hello,
I posted the same tread yesterday. Please help. I need to know what is
causing to happen.
I have a report to run a list of clients that we have not billed invoices
for. The Control Source of the report is a SQL query, and the SQL query is
pulling the info from a Select query that I created.
The problem is when I do the "Totals" on the SQL query and run it in the
Datasheet View, the sum of the "Total Accum Time" (the $ amount for the time
that we spend on a client) is not the same as without doing the "Totals" on
the SQL query. Does anyone know what causes to happen? Shouldn't the sum be
the same with or without the "Totals" the SQL query? It appears to me that
they are not pulling the same transactions.
Below is the SQL statement. In my SQL query, I have it set up so that the
report will prompt the user for a Client ID or an Affiliate Group.
Thanks.
SELECT CLIENTS.AFFGROUP AS [Aff Group], qryBilling_Summary.[Client ID],
CLIENTS.[LEGAL NAME] AS [Client Legal Name], Sum(qryBilling_Summary.[Total
Accum Time]) AS [SumOfTotal Accum Time], Sum(qryBilling_Summary.[Interim
Amount Billed]) AS [SumOfInterim Amount Billed], Sum([Interim Amount
Billed]-[Total Accum Time]) AS [Diff of Interim & Actual]
FROM qryBilling_Summary LEFT JOIN CLIENTS ON qryBilling_Summary.[Client ID]
= CLIENTS.CLNTOID
GROUP BY CLIENTS.AFFGROUP, qryBilling_Summary.[Client ID], CLIENTS.[LEGAL
NAME]
HAVING (((CLIENTS.AFFGROUP) Like nz([Please Enter Aff Group],"*")) AND
((qryBilling_Summary.[Client ID]) Like nz([Please Enter Client ID],"*")) AND
((Sum(qryBilling_Summary.[Interim Amount Billed]))=0));
I posted the same tread yesterday. Please help. I need to know what is
causing to happen.
I have a report to run a list of clients that we have not billed invoices
for. The Control Source of the report is a SQL query, and the SQL query is
pulling the info from a Select query that I created.
The problem is when I do the "Totals" on the SQL query and run it in the
Datasheet View, the sum of the "Total Accum Time" (the $ amount for the time
that we spend on a client) is not the same as without doing the "Totals" on
the SQL query. Does anyone know what causes to happen? Shouldn't the sum be
the same with or without the "Totals" the SQL query? It appears to me that
they are not pulling the same transactions.
Below is the SQL statement. In my SQL query, I have it set up so that the
report will prompt the user for a Client ID or an Affiliate Group.
Thanks.
SELECT CLIENTS.AFFGROUP AS [Aff Group], qryBilling_Summary.[Client ID],
CLIENTS.[LEGAL NAME] AS [Client Legal Name], Sum(qryBilling_Summary.[Total
Accum Time]) AS [SumOfTotal Accum Time], Sum(qryBilling_Summary.[Interim
Amount Billed]) AS [SumOfInterim Amount Billed], Sum([Interim Amount
Billed]-[Total Accum Time]) AS [Diff of Interim & Actual]
FROM qryBilling_Summary LEFT JOIN CLIENTS ON qryBilling_Summary.[Client ID]
= CLIENTS.CLNTOID
GROUP BY CLIENTS.AFFGROUP, qryBilling_Summary.[Client ID], CLIENTS.[LEGAL
NAME]
HAVING (((CLIENTS.AFFGROUP) Like nz([Please Enter Aff Group],"*")) AND
((qryBilling_Summary.[Client ID]) Like nz([Please Enter Client ID],"*")) AND
((Sum(qryBilling_Summary.[Interim Amount Billed]))=0));