Sum of "Visible" controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form which has 4 controls that I need to sum:

[Subtotal] (subtotal from subform),
[GST_Amount] (calculates GST, is hidden if GST checkbox is not chedked),
[PST_Amount] (calculates PST, is hidden if PST checkbox is not chedked), and
[HST_Amount] (calculates HST, is hidden if HST checkbox is not chedked).

Is it possible to create a Grand Total textbox that will sum the Subtotal
and only those controls that are "visible".

Or, alternatively, can anyone suggest a better way of calculating these
amounts (i.e., if GST checkbox is not checked, then "0")?

Any help would be greatly appreciated.
 
Silly me.... I just answered my own question.
=IIF([GST]=-1,([GST_Amount]*.06),0). Worked like a charm!!
 
Back
Top