Solved

Display running total on Mainform based on value on Subform datasheet

Posted on 2014-02-07
3
3,025 Views
Last Modified: 2014-02-12
form
drawing a blank on the best way to display a running total.

I want to have the field MCF Paid refresh its value when the user enters a NetAmount on a new invoice Datasheet (subform)

I have tried dsum, Recalc, change focus back to mainform and recalc - all without success.

What am I missing.

K
0
Comment
Question by:Karen Schaefer
3 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 250 total points
ID: 39843512
Best way is to put a control in the subforms footer (you can set the footers visible property to No).  Give it a name txt_MCF_Paid_Total

Set the control source of that textbox to something like:

=SUM([MCF Paid])

Then in the main form, set the control source of the control where you want to display that value to (change the names to match yours):

=Forms!yourMainFormName!subformControlName.Form.txt_MCF_Paid_Total
0
 
LVL 16

Assisted Solution

by:Sheils
Sheils earned 250 total points
ID: 39844579
Try adding an after update event in the NetAmount  textbox in your subform to change the value displayed in the main form

Something like:-

Private Sub TxtBoxName_OnChange()

Forms!MainFormName.MCF=DSum("fieldname","tablename","idfield=" & Me.ID)

fieldname and tablename are the name of the field and table that contains the net amount.
idfield is the id that links the main form and the subform.
0
 

Author Closing Comment

by:Karen Schaefer
ID: 39854981
thanks that did the trick
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now