Using tags instead of AND

rikklaney1

Registered User.
Local time
Today, 14:24
Joined
Nov 20, 2014
Messages
157
I have a form with 10 yes/no controls. The value of the 10th will be yes IF the value of all the other 9 is yes else 10 will be no. My question is can I use tags, or some other method, to look at all the controls rather than create an if statement calling out all nine controls with and? Is there a better way?
 
Sure:

Code:
  Dim ctl As Control

  For Each ctl In Me.Controls   
    If ctl.Tag = "whatever" Then
      'Do something
    End If
  Next ctl
 
That did it Uncle Gizmo. Thanks.
 
That did it Uncle Gizmo. Thanks. That intcounter was what I was missing.
 

Users who are viewing this thread

Back
Top Bottom