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 / May 2008

Tip: Looking for answers? Try searching our database.

recalc question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
C Tate - 22 May 2008 10:34 GMT
I have a main form with two linked subforms (very like the customer order
form in Northwind 2003). In the footer of the main form is a control which
calculates the amounts entered in one of the subforms to provide an overall
total. It reads =dsum("[funding]","Query1","[siteahid] ="  & [siteahid]).
Unfortunately the total won't update unless I scroll to another record.

I have been told on this formum to use recalc. However, I am not sure how to
get it to work at all.

Do I have to put the recalc function on the main form (perhaps in the
afterupdate event) or where? How exactly do I get my calculated control to
update?

Any clear advice (idiot style!) much appreciated.
Ryan Tisserand - 22 May 2008 17:55 GMT
I would take a totaly different approach.  This is the way I handle
calculations from subforms.  I would put an unbound textbox on the footer of
the subform and the control source would look something like this
Sum([funding]) and name the field TotalFunding.  Then on my main form I would
put another unbound textbox and have its control source set to
=[YourSubformName].Form!TotalFunding
Then in the On Activate event of the Main Form you would want requery so
that the total would be updated if you added another record.  The code would
look like this.
Me![YourSubformName].Requery

Hope this helps

> I have a main form with two linked subforms (very like the customer order
> form in Northwind 2003). In the footer of the main form is a control which
[quoted text clipped - 10 lines]
>
> Any clear advice (idiot style!) much appreciated.
C Tate - 22 May 2008 22:27 GMT
This is partially what I did actually. However, this only adds up all the
funding for a particular (in this case) group of houses. What the dsum
calculation does is add up the funding for all the groups of houses on a
site. And it is this that will not work/update correctly.

> I would take a totaly different approach.  This is the way I handle
> calculations from subforms.  I would put an unbound textbox on the footer of
[quoted text clipped - 23 lines]
> >
> > Any clear advice (idiot style!) much appreciated.
 
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.