Solved

Subform Total shows #Error

Posted on 2015-02-11
3
177 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
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…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

758 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

21 Experts available now in Live!

Get 1:1 Help Now