Solved Expression help (1 Viewer)

Sneale

New member
Local time
Today, 16:51
Joined
Aug 26, 2019
Messages
26
Hello,
I need to build a form that includes data from a query but need it to do a calculation when it opens. Fields I need to have calculate are SumOfPointAmt, and NotEligible. NotEligible is a yes/no field. What I need to do is have the form look at NotEligible and if the value is No, return a value of 50, then multiply the SumOfPointAmt by 2 and add the two numbers together to get a total. if the NotEligible field is True, then return just the SumOfPointAmt multiplied by 2. In Excel it looks like this:

=IF(NotEligible="No",(50+(SumOfPointAmt*2)),SumOfPointAmt*2)

I am not even sure if this is possible but would appreciate any input you may have!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:51
Joined
Oct 29, 2018
Messages
21,496
Hi. Maybe you could try this.
Code:
=IIf([NotEligible]="No",50,0)+([SumOfPointAmt]*2)
Hope that helps...
 

Sneale

New member
Local time
Today, 16:51
Joined
Aug 26, 2019
Messages
26
That worked! thank you very much!
 

Sneale

New member
Local time
Today, 16:51
Joined
Aug 26, 2019
Messages
26
one thing seems to be an issue with this. if there is no value in SumOfPointAmt, it doesn't seem to return anything in the report field.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:51
Joined
Oct 29, 2018
Messages
21,496
one thing seems to be an issue with this. if there is no value in SumOfPointAmt, it doesn't seem to return anything in the report field.
Try this:
Code:
=IIf([NotEligible]="No",50,0)+(Nz([SumOfPointAmt])*2)
 

Users who are viewing this thread

Top Bottom