Enable/Disable & Proper Subtotal

T

Tom

Joe:

I now have a follow up question...

In another thread, I asked the question as to how I can enable/disable a
textbox via a checkbox.

The suggestions from Kevin was to utilize the OnClick event with the
following code:

&&&&&&&&&&&&&&&&&&&&&&&&
If Me!chkboxcontrolname = False Then
Me!txtboxcontrolname.Value = Null
Me!txtboxcontrolname.Enabled = False
Else
txtboxcontrolname.Enabled = True
End If
&&&&&&&&&&&&&&&&&&&&&&&&

Kevin's suggestions works great. Now, here's the new tricky part.

When I used your formula "=[Box1] + [Box2]", I get the results in the
"SumBox" accurately.

However, if any one of the "subtotal boxes" has been disabled/"grayed out"
(in actuality I have 5 subtotals), then the SumBox DOES NOT show any value
at all.

Once I enable all textboxes I then see the proper total again.

Do you have any suggestions as to how I should write the formula so that it
calculates either all or only those subtotals for which the boxes have been
enabled.

Hopefully this makes sense!!!

Thanks in advance,
Tom
 
Top