Connecting Tech Pros Worldwide Help | Site Map

Scroll To Top of List Box By Code...

 
LinkBack Thread Tools Search this Thread
  #1  
Old May 29th, 2007, 03:35 PM
DavidB
Guest
 
Posts: n/a
Default Scroll To Top of List Box By Code...

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, 06:35 PM
UrbanSpaceman
Guest
 
Posts: n/a
Default 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?
>

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.