Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

wrong subform total

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mhmaid - 15 May 2007 19:41 GMT
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.)
Ofer Cohen - 15 May 2007 20:34 GMT
What do you have in the the ControlSource of the Sum text box?

Is it

=Sum([Expenseitemamount])

Signature

Good Luck
BS"D

> I have a subform called "InvoiceDetailssubform" and a main form called
> "invoices details"
[quoted text clipped - 11 lines]
> ( note: the subform is showing the correct number of records, it is not
> showing all records in the source table.)
mhmaid - 16 May 2007 03:07 GMT
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).
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.