Afternoon all. 
I've been working on a registration form where students can enroll in classes.
So far, they can enroll in multiple classes through a subform in continuous form, and the tuition total is calculated in the subform's footer. I then created a text box in the main form that refers to this subtotal, and I have a separate textbox that is bound to the main form called "PaymentAmount" which calculates TOTAL fees for the student.
For example, additional fees may be added onto the tuition total, and these are indicated by check boxes. I want to be able to perform a simple calculation (e.g. add $30 to tuition total) upon checking the corresponding box. HOWEVER, several boxes might be checked, and I don't know how to get the "PaymentAmount" to change accordingly.
The following code seems to work for just one check box at a time (On Click event), but how do I go about adding a $30 fee and possibly ANOTHER whatever-dollar fee by checking two or more boxes?
If Me.ckAppFee = True Or Me.ckLateFee = True Or Me.ckTestFee = True Then
Me.PaymentAmount = Me.TuitionTotal + 30
End If
If Me.ckAppFee = False And Me.ckLateFee = False And Me.ckTestFee = False Then
Me.PaymentAmount = Me.TuitionTotal
End If
(I hope my rambling makes sense. And I'm just getting into VBA, so apologies if my "coding" is confusing.)
I've been working on a registration form where students can enroll in classes.
So far, they can enroll in multiple classes through a subform in continuous form, and the tuition total is calculated in the subform's footer. I then created a text box in the main form that refers to this subtotal, and I have a separate textbox that is bound to the main form called "PaymentAmount" which calculates TOTAL fees for the student.
For example, additional fees may be added onto the tuition total, and these are indicated by check boxes. I want to be able to perform a simple calculation (e.g. add $30 to tuition total) upon checking the corresponding box. HOWEVER, several boxes might be checked, and I don't know how to get the "PaymentAmount" to change accordingly.
The following code seems to work for just one check box at a time (On Click event), but how do I go about adding a $30 fee and possibly ANOTHER whatever-dollar fee by checking two or more boxes?
If Me.ckAppFee = True Or Me.ckLateFee = True Or Me.ckTestFee = True Then
Me.PaymentAmount = Me.TuitionTotal + 30
End If
If Me.ckAppFee = False And Me.ckLateFee = False And Me.ckTestFee = False Then
Me.PaymentAmount = Me.TuitionTotal
End If
(I hope my rambling makes sense. And I'm just getting into VBA, so apologies if my "coding" is confusing.)