Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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 November 9th, 2005, 03:48 PM
Friend of Wrox
 
Join Date: Sep 2005
Location: , , USA.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Corey
Default Sum on a form Problem

Hello again. I'm hoping someone can help me understand and fix a summing a text box

I have one field that has a formula like this:=IIf([System Notes]="Past Due",([Cost]),"")

I changed the name that this formula is in within the properties to “Past Due Box”

Now in the now text box I created I wanted to simply sum the all of the cost that shows up in the Past Due Box. I was assuming it would be something as simple as “=Sum([Past Due Box])” but that isn’t working. Any help would be greatly appreciated.

Thanks

Corey


 
Old November 9th, 2005, 05:43 PM
Authorized User
 
Join Date: Sep 2004
Location: Nanaimo, BC, Canada.
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Assuming you are summing on a continuous form (i.e) many records, and you don't filter the recordset, you can put an unbound field in the Footer or Header of the form, and use

DSum(...) for the records on this form, then you may have to update it if it doesn't role.

You can always just put the IIf in the query behind the form, QBF,and then use Sum(Expression) and then just try to use Sum(something). Then you have to query.

A little tricky but possible. Need to make sure you get what you want.
Just do one step at a time, to make sure the formula works.


Reports are much easier, they have rolling sums.


Database Agreements




Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum function in Access form ayazhoda Access VBA 2 July 26th, 2007 04:26 PM
Problem with Sum() swierzym Reporting Services 0 October 18th, 2006 01:34 PM
Sum function accuracy problem nuthib Crystal Reports 1 June 21st, 2004 02:12 AM
sum function problem sherr8 Access 1 February 13th, 2004 03:06 PM
Aggregate Sum Problem akc SQL Server 2000 2 November 4th, 2003 10:07 AM





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