A
Alan
Good Morning!
I've been scratching my head on this one and could use a hand... I am trying
to cycle through unassociated label controls that I have added to illuminate
a "highlight" next to a column of navigation links. All of the labels have
visibility OFF before the code runs, and are named "HILITE01" thru "HILITE13"
.. The TAG property for all is set to "HILITE" for group identification. The
code runs without errors but does not successfully turn ON visibility for the
appropriate control whose last two name digits match the "intFolderNo"
variable...
-------------------------------------------------------------------
Private Sub Form_Current()
Dim ctl As Control, strX As String, intFolderNo as Integer
intFolderNo = Me.OpenArgs
Me.FormTitle = DLookup("[Folder]", "tbl_SYS-DMSNAV", "FolderOrder=" &
intFolderNo)
strX = Format(intFolderNo, "00")
For Each ctl In Forms![frm_DMSNAV].Controls
If ctl.Tag = "HILITE" Then
If Right(ctl.Name, 2) = strX Then
ctl.Visible = True
Else
ctl.Visible = False
End If
End If
Next ctl
Set ctl = Nothing
Me.btnClose.SetFocus
End Sub
I've been scratching my head on this one and could use a hand... I am trying
to cycle through unassociated label controls that I have added to illuminate
a "highlight" next to a column of navigation links. All of the labels have
visibility OFF before the code runs, and are named "HILITE01" thru "HILITE13"
.. The TAG property for all is set to "HILITE" for group identification. The
code runs without errors but does not successfully turn ON visibility for the
appropriate control whose last two name digits match the "intFolderNo"
variable...
-------------------------------------------------------------------
Private Sub Form_Current()
Dim ctl As Control, strX As String, intFolderNo as Integer
intFolderNo = Me.OpenArgs
Me.FormTitle = DLookup("[Folder]", "tbl_SYS-DMSNAV", "FolderOrder=" &
intFolderNo)
strX = Format(intFolderNo, "00")
For Each ctl In Forms![frm_DMSNAV].Controls
If ctl.Tag = "HILITE" Then
If Right(ctl.Name, 2) = strX Then
ctl.Visible = True
Else
ctl.Visible = False
End If
End If
Next ctl
Set ctl = Nothing
Me.btnClose.SetFocus
End Sub