Connecting Tech Pros Worldwide Help | Site Map

Scroll To Top of List Box By Code...

  #1  
Old May 29th, 2007, 04:35 PM
DavidB
Guest
 
Posts: n/a
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?

  #2  
Old May 29th, 2007, 07:35 PM
UrbanSpaceman
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
New to Actionscript, help with movie clips! SR90 answers 1 March 4th, 2008 06:07 PM
Listbox vertical scroll position capture Lit answers 7 August 21st, 2007 09:25 PM
Use parameters from a multi select list box in a query SuffrinMick answers 5 November 13th, 2005 06:26 AM
move to a particular record in a list box? Jonathan LaRosa answers 8 November 12th, 2005 11:41 PM