Solved

Subform Total shows #Error

Posted on 2015-02-11
3
182 Views
Last Modified: 2015-02-16
In MS Access 2010 I have Main form frmMain and subform frmSubMain.
Both forms are not bound forms.
On subform  frmSubMain I have a  several fields one of them is field : “Amount”  this field  I want to summarize.

 All fields on subform showing proper values and that is ok and I can see  Amounts value too .
I put in subform frmSubMain footer  text field txtTotAmount and  formatted it as currency and here I went through Expression Builder and find the field Amount in subform  frmSubMain and put it in, so in field I have : =Sum([Amount]).
It worked before, and I was getting proper amount total value,  I do not remember changing something,  but now I am getting in the txtTotAmount  field value    “ #error “ I tried with  =NZ(Sum(Amount)) but it not worked.
0
Comment
Question by:Taras
  • 2
3 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40603834
If you want to a control to display a sum, you need to:

1.  use the DSUM( ) domain function to define what column you want to sum, from which table, and under what criteria.

2.  in a bound, continuous form, you could put a control in the footer (txt_SumAmount) of the form and set its control source to:

= SUM([Amount])

If you want to display this sum on the main form, you would hide the footer of the subform, and set the ControlSource of the control on the main form to something like:

= Forms!MainFormName.subFormControlName.Form.txt_SumAmount
0
 

Accepted Solution

by:
Taras earned 0 total points
ID: 40603883
I apologize,  I said subform is not bound  I was wrong . Actually Record Source of subform is Query:  “ QryQueryOne”.
So it means subform  frmSubMain is bound to that query.
0
 

Author Closing Comment

by:Taras
ID: 40611878
Thanks a lot.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

911 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

22 Experts available now in Live!

Get 1:1 Help Now