hi,
I'm having problems calculating my totals in a report i'm building....
i'm using the Sum() method but i doesn't give me the right results
I have a large query contaning the information for the form
(i use it as my control source)
I then group the data from inside the report.
(ps: the query's info cannot be grouped)
my problem is, when i try to calculated the sum for my groups, i get the sum of each and every record instead of the sum per group
for example:
this is the info returned from my query
in my report, i group by employee so i have something like this
the problem is,
my Sum([pay]) in the footer of my employee group
would return 3200 instead of 1500
every sum does that (adds every record in my query)
i also tried DSum() but it doesn't work
it still adds every record in the query instead of the information under its group in the report...
i have another wierd problem
if i change the name of a control and refer to it using a method (like sum())
i get a pop up inputbox asking for the value of the control
as soon as the control name and control source are different, i get the pop up
i dont understand why...
I'm having problems calculating my totals in a report i'm building....
i'm using the Sum() method but i doesn't give me the right results
I have a large query contaning the information for the form
(i use it as my control source)
I then group the data from inside the report.
(ps: the query's info cannot be grouped)
my problem is, when i try to calculated the sum for my groups, i get the sum of each and every record instead of the sum per group
for example:
this is the info returned from my query
Code:
employeeName month pay
John April 500
John May 500
John June 500
Bob May 250
Bob June 250
Jill April 400
Jill May 400
Jill June 400
Code:
John April 500
May 500
June 500
my Sum([pay]) in the footer of my employee group
would return 3200 instead of 1500
every sum does that (adds every record in my query)
i also tried DSum() but it doesn't work
it still adds every record in the query instead of the information under its group in the report...
i have another wierd problem
if i change the name of a control and refer to it using a method (like sum())
i get a pop up inputbox asking for the value of the control
as soon as the control name and control source are different, i get the pop up
i dont understand why...