M Martin Dec 1, 2009 #1 Is there an easy way to move to the next record in a list box after the list box has been clicked on? Martin
Is there an easy way to move to the next record in a list box after the list box has been clicked on? Martin
A Alex Dybenko Dec 1, 2009 #2 Hi, you can use following code: If Me.MyListbox.ListCount > 0 Then Me.MyListbox.Selected(1) = True end if -- Best regards, ___________ Alex Dybenko (MVP) http://accessblog.net http://www.PointLtd.com
Hi, you can use following code: If Me.MyListbox.ListCount > 0 Then Me.MyListbox.Selected(1) = True end if -- Best regards, ___________ Alex Dybenko (MVP) http://accessblog.net http://www.PointLtd.com
S Stuart McCall Dec 1, 2009 #3 Martin said: Is there an easy way to move to the next record in a list box after the list box has been clicked on? Martin Click to expand... Try the following code in your listbox's AfterUpdate event: Dim idx As Long With Me.MyListbox idx = .ListIndex If .ListCount > 1 And idx < .ListCount Then .ListIndex = idx + 1 End If End With
Martin said: Is there an easy way to move to the next record in a list box after the list box has been clicked on? Martin Click to expand... Try the following code in your listbox's AfterUpdate event: Dim idx As Long With Me.MyListbox idx = .ListIndex If .ListCount > 1 And idx < .ListCount Then .ListIndex = idx + 1 End If End With