Solved calculated field based on checkbox in report (1 Viewer)

M Costumes

Member
Local time
Today, 08:13
Joined
Feb 9, 2021
Messages
75
I'm working on a report and am creating some calculated text fields. I have a checkbox, and if it is checked, I want it to calculate a value, and if unchecked return 0.

Basically I'm trying to get:
if checkbox = true, then count[field]*15
if checkbox = false, then 0

I'm very new and am still trying to grasp IIF statements, and am having trouble getting the right syntax. Thanks for your guidance!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:13
Joined
Oct 29, 2018
Messages
21,358
Hi. Try using an IIf() statement. For example:
Code:
=IIf([Checkbox]=True,Count([Field])*15,0)
 

M Costumes

Member
Local time
Today, 08:13
Joined
Feb 9, 2021
Messages
75
Hi. Try using an IIf() statement. For example:
Code:
=IIf([Checkbox]=True,Count([Field])*15,0)
Success! Thank you! I was missing and/or adding extra parentheses. Weeeee!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:13
Joined
Oct 29, 2018
Messages
21,358
Success! Thank you! I was missing and/or adding extra parentheses. Weeeee!
You're welcome. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom