Track amount based on yes/no responses

I

Imara96

I'm tracking payment per session so if any of the 16 sessions are
checked yes, I would like the Amount field to populate with 45 for each
session. So if three sessions are selected, the amount field would
display 135. I created a yes/no field for each of the sessions labeled
session1, session2, etc. and an amount field.

I would love it if anyone could provide the code to accomplish this
feat ;-)
 
M

Marshall Smith

OK, here's a funky little trick. Access actually stores the value of each
checkbox as 0 for no and -1 for yes. So, to calculate the total, add up all
the checkboxes, and multiply the total by -45. The resulting expression
should look something like:

=(chkSession1 + chkSession2 + chkSession3 + ... + chkSession16)*(-45)

HTH,

Marshall Smith
Project Developers, Inc.
 
I

Imara96

Thank you for your response!!

It seems like such an easy solution but it's still not working for me.
Do I put that formula in the After Update event on the Amount field?
 

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