Connecting Tech Pros Worldwide Forums | Help | Site Map

Scroll To Top of List Box By Code...

DavidB
Guest
 
Posts: n/a
#1: May 29 '07
I have an extended multi select list box on one of my forms. As an
example the list box would contain a list of vendors including a
'default' vendor called "Unknown". As an FYI, the query that drives
the list box is written such that the Unknown vendor is listed first
followed by all 'real' vendors alphabetically. The list box is
formatted so that six vendors out of approximately seventy display at
one time. I want to keep that size. Is theer a way to code a button
to scroll the list box to the first/last item in the list rather than
just mark a given record as selected?


UrbanSpaceman
Guest
 
Posts: n/a
#2: May 29 '07

re: Scroll To Top of List Box By Code...


To scroll to top of list:

Dim lst As ListBox
Set lst = Me!List0

lst.ListIndex = 0

To scroll to bottom:

lst.ListIndex = lst.ListCount - 1

"DavidB" <jebva@yahoo.comwrote in message
news:1180452504.823950.36080@q69g2000hsb.googlegro ups.com...
Quote:
>I have an extended multi select list box on one of my forms. As an
example the list box would contain a list of vendors including a
'default' vendor called "Unknown". As an FYI, the query that drives
the list box is written such that the Unknown vendor is listed first
followed by all 'real' vendors alphabetically. The list box is
formatted so that six vendors out of approximately seventy display at
one time. I want to keep that size. Is theer a way to code a button
to scroll the list box to the first/last item in the list rather than
just mark a given record as selected?
>

Closed Thread