Solved

Display running total on Mainform based on value on Subform datasheet

Posted on 2014-02-07
3
3,196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

751 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