Changing total amount under certain circumstances

G

Guest

I have a query that does a calculation with several objects. Under certain
circumstances, 3 part of the calculation are waived. I have created an
expression that totals these amounts. Now I have added a checkbox to the job
form to identify the exception. How do I subtract the waived amount from the
total for the records that have the checkbox selected?
 
G

Guest

After reviewing this issue I find what I really need to do is make the 3
waived values equal to zero so they show 0.00 in the report I am using. Can I
do it like: Expr: IIf([Waived] = True, calc1=0 and calc2=0 and calc3=0,0)

If not how do I do it?


Arvin Meyer said:
Look at the Immediate If function: IIf(Expression, TruePart, FalsePart) so
the query column would look like:


Expr1: IIf([CheckBoxFieldName]= True, Calc1, Calc2)

substituting your field names and calculations
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access

Frank said:
I have a query that does a calculation with several objects. Under certain
circumstances, 3 part of the calculation are waived. I have created an
expression that totals these amounts. Now I have added a checkbox to the job
form to identify the exception. How do I subtract the waived amount from the
total for the records that have the checkbox selected?
 
A

Arvin Meyer [MVP]

I don't think so, but you can do:

Expr1: IIf([Waived]= True, 0, Calc1)
Expr2: IIf([Waived]= True, 0, Calc2)
Expr3: IIf([Waived]= True, 0, Calc3)
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Frank said:
After reviewing this issue I find what I really need to do is make the 3
waived values equal to zero so they show 0.00 in the report I am using. Can I
do it like: Expr: IIf([Waived] = True, calc1=0 and calc2=0 and calc3=0,0)

If not how do I do it?


Arvin Meyer said:
Look at the Immediate If function: IIf(Expression, TruePart, FalsePart) so
the query column would look like:


Expr1: IIf([CheckBoxFieldName]= True, Calc1, Calc2)

substituting your field names and calculations
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access

Frank said:
I have a query that does a calculation with several objects. Under certain
circumstances, 3 part of the calculation are waived. I have created an
expression that totals these amounts. Now I have added a checkbox to
the
job
form to identify the exception. How do I subtract the waived amount
from
the
total for the records that have the checkbox selected?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top