Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Display running total on Mainform based on value on Subform datasheet

Posted on 2014-02-07
3
Medium Priority
?
3,293 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 48

Accepted Solution

by:
Dale Fye earned 1000 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 1000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

730 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