Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2005, 02:59 PM
Authorized User
 
Join Date: Apr 2005
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Default #ERROR - HELP

I have a main report that has 3 sub reports in it. I do have 1 total text box for each sub report on the main report. Ie.: subrptProductionTotal, subrptItemizedTotal, etc... I also have 1 grand total text box that sums the totals of each sub report total. It all works fine as long as there is data in all 3 sub reports. However, if a particular sub report has no data, I receive #ERROR in that sub report total text box and also in the grand total text box. The codes I have tried do not return a value of 0 for reports that do not have any data.

Any suggestions?

D. Bartelt
__________________
D. Bartelt
 
Old September 26th, 2005, 05:31 PM
Friend of Wrox
 
Join Date: Jul 2005
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How are you calculating the sum?

Have you tried to use NZ()?

What verion of Access are you using?

Boyd
"Hi Tech Coach"
Access Based Accounting/Business Solutions developer.
http://www.officeprogramming.com
 
Old September 26th, 2005, 08:19 PM
Authorized User
 
Join Date: Apr 2005
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am using a "rounding module" that rounds currency values to the next whole cent and forces 2 decimal places.
Example =Sum((RoundCC([UnitPrice]*[Multiplier])+Sum(RoundCC([UnitPrice]*[Multiplier]*[SurchargePercent])/100))
All of the subform fields calculate properly. The main report fields calculate properly as long as each subreport has data. If one of the subreports doesn't have any data, I receive #ERROR in that particular subreports total. As well as the grand total field.
The main report grand total field properties are =[subrptProductionTotal]+[subrptToolsTotal]+[subrptItemizedTotal]

I am still using Access 97. (Not By Choice)

Thanks,

D. Bartelt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
[Resolved] Error calling a sp - parameter error snufse .NET Framework 2.0 2 February 12th, 2008 04:46 PM
Parse error: syntax error, unexpected T_STRING ginost7 Beginning PHP 1 November 9th, 2007 02:51 AM
Phile Page error, visual studio error reps BOOK: ASP.NET Website Programming Problem-Design-Solution 0 September 27th, 2003 10:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.