The TAG property allows you to associate up to 2,084 characters of text with any form, report, section, or control. This is especially helpful when you want to single out a specific subset of controls.
For instance, say that you want to hide certain controls on a form when a user clicks a button.
You can flag which controls will be hidden by entering the word "Hide" (or any other consistent word) in each control's Tag property. Then, attach the following code to the command button's Click event procedure:
Dim ctl As Control For Each ctl In Me.Controls If ctl.Tag = "Hide" Then ctl.Visible = False End If Next
See all Topics