Solved

Total For Two Fields On a bound form

Posted on 2014-01-02
3
279 Views
Last Modified: 2014-01-02
The user has requested a total of two fields on a form bound to a table (tblAccountInfo)

The fields are PrincipalAmt and InterestAmt.

T o create the total fields I copy and pasted the InterestAmt field.

I then replaced the control source with several variations of 'PrincipalAmt + InterestAmt' in one even included and = first  '=PrincipalAmt + InterestAmt'

NO matter what I've tried I get the #Name in the field when the form is displayed.

What is the magic combination to get a total for these two fields on the screen?
0
Comment
Question by:mlcktmguy
3 Comments
 

Accepted Solution

by:
kevinrea earned 250 total points
ID: 39753087
In the control source of your new field, that is, the one that you want the total to appear in , you want to put the following:
=[PrincipalAmt] + [InterestAmt]

Kevin Rea
0
 
LVL 75
ID: 39753094
You will also probably want to wrap each Field with Nz(), in case one of the values is Null and the other is not:

=Nz([PrincipalAmt],0) + Nz([InterestAmt],0)

This will avoid 'Null Propagation'

mx
0
 
LVL 1

Author Closing Comment

by:mlcktmguy
ID: 39753095
Yep, that was the magic combo, enclosing each field in brackets
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

896 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

11 Experts available now in Live!

Get 1:1 Help Now