Solved

Display running total on Mainform based on value on Subform datasheet

Posted on 2014-02-07
3
3,247 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 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
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…
Suggested Courses

626 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