You would need to do it using VBA, such as...
If Me.txtMyField.Visible = True Then SumField = SumField + Me.txtMyField.Value
OR...
SumField = SumField - (Me.txtMyField.Value * Me.txtMyField.Visible)
You would need one of these lines of code for each field that you want to check.