N
noservice
hello again everyone.
I am re-working an old report that shows an audit of data entered. It
also should include averages of usage and dollar amounts. It seems to
work just fine, however on the report print out, it has the same line
multiple times, instead of a single line of information for an
account.
This is how the main query is set up.
paysum audit sub 1 gets most of the data, and i've set up three other
queries to calculate totals, and number of entries for my averages.
All of that is fine, it is only that the output shows at the very
least double lines of each entry. (some entries show correctly as one
line).
SELECT [qryPaymentSummary - Audit Sub 1].[Payment Summary],
[qryPaymentSummary - Audit Sub 1].[Acct ID], [qryPaymentSummary -
Audit Sub 1].Client, Accounts.Provider, [qryPaymentSummary - Audit Sub
1].Type, Accounts.Account, [qryPaymentSummary - Audit Sub 1].From,
[qryPaymentSummary - Audit Sub 1].To, [qryPaymentSummary - Audit Sub
1].[Current Utility Charges], [Totals]![SumOfCurrent Utility Charges]/
[EntryCount]![EntryCount] AS [Average Charges], [qryPaymentSummary -
Audit Sub 1].Usage, [Totals]![SumOfUsage]/[EntryCount]![EntryCount] AS
[Average Usage]
FROM (((Data INNER JOIN Accounts ON Data.[Acct ID] = Accounts.[Acct
ID]) INNER JOIN [qryPaymentSummary - Audit Sub 1] ON Accounts.[Acct
ID] = [qryPaymentSummary - Audit Sub 1].[Acct ID]) INNER JOIN Totals
ON Accounts.[Acct ID] = Totals.[Acct ID]) INNER JOIN EntryCount ON
Accounts.[Acct ID] = EntryCount.[Acct ID]
GROUP BY [qryPaymentSummary - Audit Sub 1].[Payment Summary],
[qryPaymentSummary - Audit Sub 1].[Acct ID], [qryPaymentSummary -
Audit Sub 1].Client, Accounts.Provider, [qryPaymentSummary - Audit Sub
1].Type, Accounts.Account, [qryPaymentSummary - Audit Sub 1].From,
[qryPaymentSummary - Audit Sub 1].To, [qryPaymentSummary - Audit Sub
1].[Current Utility Charges], [Totals]![SumOfCurrent Utility Charges]/
[EntryCount]![EntryCount], [qryPaymentSummary - Audit Sub 1].Usage,
[Totals]![SumOfUsage]/[EntryCount]![EntryCount]
HAVING ((([qryPaymentSummary - Audit Sub 1].[Payment
Summary])=GetPaymentSummaryNumber()) AND (([qryPaymentSummary - Audit
Sub 1].Client)=[Forms]![Payment Summary]![Client Lookup]) AND
((Accounts.Provider)=[Forms]![Payment Summary]![cmbProvider])) OR
((([qryPaymentSummary - Audit Sub 1].Client)=[Forms]![Payment Summary]!
[Client Lookup]) AND ((Accounts.Provider)=[Forms]![Payment Summary]!
[cmbProvider]));
I am at a loss to explain why this is occuring. If you could please
assist me in fixing the issue, It would be MOST appreciated.
Sincerley,
M. Carrizales
I am re-working an old report that shows an audit of data entered. It
also should include averages of usage and dollar amounts. It seems to
work just fine, however on the report print out, it has the same line
multiple times, instead of a single line of information for an
account.
This is how the main query is set up.
paysum audit sub 1 gets most of the data, and i've set up three other
queries to calculate totals, and number of entries for my averages.
All of that is fine, it is only that the output shows at the very
least double lines of each entry. (some entries show correctly as one
line).
SELECT [qryPaymentSummary - Audit Sub 1].[Payment Summary],
[qryPaymentSummary - Audit Sub 1].[Acct ID], [qryPaymentSummary -
Audit Sub 1].Client, Accounts.Provider, [qryPaymentSummary - Audit Sub
1].Type, Accounts.Account, [qryPaymentSummary - Audit Sub 1].From,
[qryPaymentSummary - Audit Sub 1].To, [qryPaymentSummary - Audit Sub
1].[Current Utility Charges], [Totals]![SumOfCurrent Utility Charges]/
[EntryCount]![EntryCount] AS [Average Charges], [qryPaymentSummary -
Audit Sub 1].Usage, [Totals]![SumOfUsage]/[EntryCount]![EntryCount] AS
[Average Usage]
FROM (((Data INNER JOIN Accounts ON Data.[Acct ID] = Accounts.[Acct
ID]) INNER JOIN [qryPaymentSummary - Audit Sub 1] ON Accounts.[Acct
ID] = [qryPaymentSummary - Audit Sub 1].[Acct ID]) INNER JOIN Totals
ON Accounts.[Acct ID] = Totals.[Acct ID]) INNER JOIN EntryCount ON
Accounts.[Acct ID] = EntryCount.[Acct ID]
GROUP BY [qryPaymentSummary - Audit Sub 1].[Payment Summary],
[qryPaymentSummary - Audit Sub 1].[Acct ID], [qryPaymentSummary -
Audit Sub 1].Client, Accounts.Provider, [qryPaymentSummary - Audit Sub
1].Type, Accounts.Account, [qryPaymentSummary - Audit Sub 1].From,
[qryPaymentSummary - Audit Sub 1].To, [qryPaymentSummary - Audit Sub
1].[Current Utility Charges], [Totals]![SumOfCurrent Utility Charges]/
[EntryCount]![EntryCount], [qryPaymentSummary - Audit Sub 1].Usage,
[Totals]![SumOfUsage]/[EntryCount]![EntryCount]
HAVING ((([qryPaymentSummary - Audit Sub 1].[Payment
Summary])=GetPaymentSummaryNumber()) AND (([qryPaymentSummary - Audit
Sub 1].Client)=[Forms]![Payment Summary]![Client Lookup]) AND
((Accounts.Provider)=[Forms]![Payment Summary]![cmbProvider])) OR
((([qryPaymentSummary - Audit Sub 1].Client)=[Forms]![Payment Summary]!
[Client Lookup]) AND ((Accounts.Provider)=[Forms]![Payment Summary]!
[cmbProvider]));
I am at a loss to explain why this is occuring. If you could please
assist me in fixing the issue, It would be MOST appreciated.
Sincerley,
M. Carrizales