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 / December 2007

Tip: Looking for answers? Try searching our database.

Get SumTotals from Subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
katz - 17 Dec 2007 18:22 GMT
Hello,
I have a Mainform with a Subform with details. In the subform I have a
control name 'Amount ' and in the Form footer I have TotAmt using Sum to get
the total of all the detail Amounts, and on the MainForm I display the
TotAmt field.
The problem is, the Sum(TotAmt) control gets updated only when the user tabs
to the next record.
Many time the user will press a button (for processing) on the Main form,
before going to the next record on the Detail and I don't have the sum of
all detail records yet.
How can I get the correct sum for TotAmt as they press the button on the
Main form, because on the On click event I need the correct Sum(TotAmt). I
tried to add the saveRecord right in the beginning, but it doesn't work.
Thanks
Abe
Beetle - 17 Dec 2007 20:46 GMT
You could try adding a line of code at the beginning of your main form
buttons OnClick event like;

Me.[NameOfYourSubfomControl].Form.Dirty = False

HTH
Signature

_________

Sean Bailey

> Hello,
> I have a Mainform with a Subform with details. In the subform I have a
[quoted text clipped - 13 lines]
>
>  
katz - 18 Dec 2007 15:43 GMT
Hi Sean, thanks for your reply, but it doesn't work. I have to press twice
the button on the main form, in order the totalAmt should change.
Is there another way?
Thanks

> You could try adding a line of code at the beginning of your main form
> buttons OnClick event like;
[quoted text clipped - 21 lines]
>> Thanks
>> Abe
 
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.