Form Totals

BLD

New member
Local time
Today, 14:20
Joined
Jun 26, 2015
Messages
6
I am hoping I can explain what I am trying to do sufficiently.

I have a form with 4 text fields for each

txt_TOTAL POINTS POSSIBLE
txt_TOTALS POINTS RCVD
txt_Exclude , Check box to exclude points if checked

At the bottom of the form I am totaling up the Points Possible & Points Rcvd.

I want to be able to exclude the points if the check box is marked. I am thinking some kind of If...Then statement?

Thanks to All.
 
Along the lines of:

=Sum(IIf(txt_Exclude = -1, 0, PointsRecd))
 
Thank you for your reply but I can't seem to get that to work.

I set this up on the click event of the check box where if the box is not checked it will add up the next 2 fields. If the box IS checked it will add up only the second field.

The only issue is if both boxes are excluded how to show 0.

If Me![1 Exclude] = False Then

Me![Points Earned] = Me![txt1_4 Points Received] + Me![txt2_8 Points received]

Else
Me![Points Earned] = Me![txt2_8 Points Received]
 
Based on your first post I got the impression you wanted to total in the form footer, so my suggestion was a for a textbox there. You would only need code like that if you wanted to store a calculated value. That said, I don't see anything wrong with the code, other than a missing "End If" which I assume got cut off.
 

Users who are viewing this thread

Back
Top Bottom