Is there an easy way to move to the next record in a list box after the list
box has been clicked on?
Martin
|
|
0
|
|
|
|
Reply
|
Utf
|
12/1/2009 10:58:02 AM |
|
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
"Martin" <Martin@discussions.microsoft.com> wrote in message
news:40D2CCF5-0F84-4A49-94F4-6D2E37C8F82F@microsoft.com...
> Is there an easy way to move to the next record in a list box after the
> list
> box has been clicked on?
>
> Martin
|
|
0
|
|
|
|
Reply
|
Alex
|
12/1/2009 11:50:33 AM
|
|
"Martin" <Martin@discussions.microsoft.com> wrote in message
news:40D2CCF5-0F84-4A49-94F4-6D2E37C8F82F@microsoft.com...
> Is there an easy way to move to the next record in a list box after the
> list
> box has been clicked on?
>
> Martin
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
|
|
0
|
|
|
|
Reply
|
Stuart
|
12/1/2009 2:37:50 PM
|
|