Solved

Main Form field not changing when subform field total changes

Posted on 2013-11-07
3
667 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
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
pdebaets earned 500 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

708 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

10 Experts available now in Live!

Get 1:1 Help Now