A family of Microsoft relational database management systems designed for ease of use.
Tab control with list box
I have a list box pasted in a tab control, which I would like when the tab is clicked to have the first item in the list box to be highlighted or selected, but I'm not having any luck. I tried using the macro builder and even vba but not getting the results I need. I can get it to work, using either macro builder or vba if the list box is on the details section of the page using the forms On Load event, but not when I place the list box in the tab control.
The name of the tab being clicked is pgQueries and the name of the list box is lstQueryList.
I've tried the following vba with the pgQueries On Click Event
Private Sub pgQueries_Click()
Me.lstQueryList.SetFocus
Me.lstQueryList.Selected(0) = True
End Sub
With the Macro Builder I've tried
GoToControl
Control Name: lstQueryList
SendKeys
Keystrokes: {Down}
Wait: No
Neither will work. Can someone please help me
Thanks,
Mike
Microsoft 365 and Office | Access | For home | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.