?
Solved

Main Form field not changing when subform field total changes

Posted on 2013-11-07
3
Medium Priority
?
729 Views
Last Modified: 2013-11-07
I have a form which contains a subform.  When records are added to the subform there is a total in the footer of that subform.  The value of this total is supposed to update in a separate field on the  main form when records are added to the subform but it isn't changing.

The Main form is named frmInvoiceMaster and the field on that form which is supposed to update is named txtInvoiceTotal

The subform is named frmInvoiceDetail and field in the form's footer which DOES recalculate when records are added is named txtTotal.

How can I make the field in the main form recalculate when records are added to the subform?

--Steve
0
Comment
Question by:SteveL13
[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
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
pdebaets earned 2000 total points
ID: 39631527
The control source for the field on the parent form should be

=MySubformControlName.form!txtTotal

... where "MySubformControlName" is the name of the subform control on the parent form.

You can enhance this with Dev Ashish's nnz function

http://access.mvps.org/access/forms/frm0022.htm

Ex.:

=nnz(MySubformControlName.form!txtTotal)
0
 

Author Comment

by:SteveL13
ID: 39631554
I just discovered that the value on the subform IS NOT changing.  Why would that be?
0
 

Author Comment

by:SteveL13
ID: 39631617
Never mind.  I got that.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
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.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

800 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