• for each code (Access 2000)

    Author
    Topic
    #438727

    i have 10 labels called Lbl1,Lbl2, etc. I want to build a command making the labels visible and invisible using the ” for each ” construction. How can i do that ?

    Viewing 0 reply threads
    Author
    Replies
    • #1046831

      Like this:

      Sub ShowLabels(f As Boolean)
      Dim i As Integer

      For i = 1 To 10 ‘ change to number of labels
      Me.Controls(“Lbl” & i).Visible = f
      Next i
      End Sub

      Use like this to make the labels visible:

      ShowLabels True

      and like this to hide them:

      ShowLabels False

    Viewing 0 reply threads
    Reply To: for each code (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: