Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Forums > Access
Back to Access Forum    Comments List
Form Footer Total MultiCrit Upload Images   Link   Email  
Walter Hamilton 
I'm trying to add several form footer totals based off the field [Total Value].  The issue is I need it reference the field [Stage_ID].  I need a form footer total for each of five stages with the Stage_ID of 1, 2, 3, 4, or 5.

I've attempted DSum, DLookup and IIf.
Adam Schwanz 
So your saying you need the total value when it's marked stage ID 1, stage ID 2 etc? I would think DSUM would work for that

What expression did you try?
DSUM("[Total Value]","TableName","Stage_ID=1")

Can you upload an image to make sure I understand what you're asking? You can push the upload images button on the top right of your post.
Walter Hamilton 

Walter Hamilton 
Adam -

DSum works when I'm referencing tbl_Tasks.  I need the sum to update according to what is displayed on the form.  I'll be filtering it by Directorate with a combo box.  I'll upload an image of the Opportunity Dashboard.  Bottom Line.  I want the "Un-Weighted" text boxes at the top of the form to update according to what is displayed in the subform as it is filtered by the selection in the Directorate combo box.  The Un-Weighted text boxes currently work using DSum but they don't update as the subform is filtered.
Walter Hamilton 

Adam Schwanz 
So what happens if you change the control source in those stage total fields to change in an after update event of your filters? So if you filter the page to only show say ContactID=1 you change the control source in those fields to DSUM("[Total Value]","TableName","StageID=1 AND ContactID=1"

I'm sure you can do this a lot more elegantly with a function than having to hardcode all the fields.
Alex Hedley 
If you're doing a DSUM or SUM or DLOOKUP in the Detail section you'll need to also add the Criteria there, where as if the Detail section is filtered the Footer values will also filter since it�s based on the current recordset
Walter Hamilton 
Adam -

The expression I'm currently using for Stage 0 Unweighted is:

=Format(Nz(DSum("[Total Value]","[tbl_Tasks]","[Stage_ID]=1"),0),"Currency")

SO what you're saying is I need to change the Where criteria to something like:

"Stage_ID]=1 AND [Directorate_ID] = [Directorate_ID]")

The Combo Box on the form is named: Directorate_ID
Adam Schwanz 
Well, that's about as simple as it gets. I didn't think that worked with filters for some reason but it appears to.
Richard Rost 
Base your form on a query. In that query, add a calculated field.

SumTotalValue: IIF(StageID=1 OR StageID=2 OR StageID=3, TotalValue, 0)

Then just SUM up the TV in the footer. No need for DSUM, although that would work too, albeit slower.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/28/2024 7:05:46 AM. PLT: 1s