I have four combo boxes text fields (S1, S2, S3 and S4) on a form that are bound to four fields (Score1, Score2, Score3 and Score4) in table Class. These fields have data type as number (integer), and they are control sources of those four combo box fields.
S1, S2, S3 and S4 each has a dropdown value from 0 to 100 (with interval 10) for user to select.
I'd like to calculate the total of these field based on what user entered and put the result into a text field, name txtTotalScore. This field is not bound to any field in the table Class.
After user enters values for each field, I'd like to validate the total of these fields: they must be equal to 100.
A simple general formula for the TotalScore field at its control source is S1+S2+S3+S4.
How can I apply this formular in MS Access correctly to yield the correct result and how I validate it in codes?
Thank you in advance for your help.