Solved

How to base the sum of a control on the state of another control (checkbox)

Posted on 2015-02-12
5
72 Views
Last Modified: 2015-02-12
I have a subform for which I am summing one of the controls, using the simple expression =Sum([LineTotal])

I would like that sum to only include the records for which a checkbox control is "true", but I'm not certain how to modify my expression to accomplish this. (see attachment)

Thank you in advance.clip.jpg
0
Comment
Question by:Shooter54
  • 3
  • 2
5 Comments
 
LVL 29

Accepted Solution

by:
IrogSinta earned 500 total points
Comment Utility
=Sum(IIF([CheckBoxFieldName],[LineTotal],0))

Ron
0
 

Author Comment

by:Shooter54
Comment Utility
Perfect! Thank you very much.
0
 

Author Comment

by:Shooter54
Comment Utility
I've requested that this question be closed as follows:

Accepted answer: 0 points for Shooter54's comment #a40606578

for the following reason:

Simple and concise solution to what to me was a difficult problem.
0
 
LVL 29

Expert Comment

by:IrogSinta
Comment Utility
Looks like you inadvertently selected your own comment as the answer.  I suggest you click on Request Attention at the top (right after your question) to someone fix this.
0
 

Author Comment

by:Shooter54
Comment Utility
I inadvertently accepted my own response as the solution. (sorry, new user) IrogSinta, ID 40606608 provided me the solution. Please resolve.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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.

728 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

9 Experts available now in Live!

Get 1:1 Help Now