If Statement Calcualtion

sandylt

Registered User.
Local time
Yesterday, 18:28
Joined
Mar 11, 2004
Messages
36
Looking for a way to sum visible fields only. Have five fields to total. Depending on code some of these fields are not visible. Is there a way to total the visible fields only?
 
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.
 
Works great
Thanks
 

Users who are viewing this thread

Back
Top Bottom