?
Solved

Access Continuous Form Subtotal Textbox #Error

Posted on 2014-02-18
5
Medium Priority
?
1,565 Views
Last Modified: 2014-02-18
Hello experts!

I have a form with a subform.  The subform's info comes from a query.  In the Footer of the Subform I put an unbound textbox.

The continuous form's bound field is [AmtIn].  In the footer I put the formula
=nz(Sum([AmtIn]),0)

Everything works great EXCEPT when the query results in "No Records".  Then I get the dreaded #Error which throws every other calculated field on the Form to #Error.

Am I doing something wrong or is this a Access 2007 bug that was never fixed?
0
Comment
Question by:wlwebb
[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
  • 2
5 Comments
 
LVL 22

Expert Comment

by:Kelvin Sparks
ID: 39868276
Have you tried Sum(Nz([AmtIn],0))?

I think you need to do the Nz bit before the sum not after.

Kelvin
0
 
LVL 48

Accepted Solution

by:
Dale Fye earned 2000 total points
ID: 39868277
How about basing the other controls which are based on the txt_Total control in the subform with a control source of something like:

=IIF(IsError(me.subformcontrol.form.txt_Totals), 0, me.subformcontrol.form.txt_Totals)
0
 

Author Comment

by:wlwebb
ID: 39868482
Kevin.

Doesn't work if Query has no records.
0
 

Author Closing Comment

by:wlwebb
ID: 39868517
Thanks Fyed.....  Works like a charm... Tried Iserror but my syntax was wrong.  Thank you
0
 
LVL 48

Expert Comment

by:Dale Fye
ID: 39868541
glad to help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

752 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