So - if all four all selected, you'd want TB = 4? Maybe set the checkboxes to 1 if selected, and then have a default value for your text box that adds all of them? Otherwise, you'll need to put rules on all 4 checkboxes to change the value of the textbox when one of the checkboxes changes.