wrong subform total

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform called "InvoiceDetailssubform" and a main form called
"invoices details"
in the subform there is a field Expenseitemamount
so to get total of this field ,i have places a text box in the footer of the
subform , which i called it "Expense Totals"
now i want to get this figure for each record of the form " invoices
details" but unfortunatley am i getting wrong figure , i get the total amount
of all records in the source table of the subform .
although i am using the same way in another main and subform , and getting
correct results.
what could be the problem, how can i make it to show only total amount of
the subform records the belongs to the current main form record only.

( note: the subform is showing the correct number of records, it is not
showing all records in the source table.)
 
What do you have in the the ControlSource of the Sum text box?

Is it

=Sum([Expenseitemamount])
 
Is it

=Sum([Expenseitemamount])

yes , exactly.

and , the source for the field that i want it to show the result is this:

=[InvoicedetailsSubform].Form![Expense Totals]

but is showing the grand total for all of the records in the source table,
not only those which belongs to the current record of main form , as it is
acutlly showing(the subform is showing correct no of records).
 
Back
Top