Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / February 2008

Tip: Looking for answers? Try searching our database.

Follow up... How do I force a muoltiselect to scroll to a selected record?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Max Moor - 14 Feb 2008 06:15 GMT
Hi All,

       Mark woke me up to how to select a record in a multiselect listbox, but
if the record I select is way down the list, how do I make the list scroll
down so it's shown?

- Max
John W. Vinson - 14 Feb 2008 06:42 GMT
>Hi All,
>
[quoted text clipped - 3 lines]
>
>- Max

If you type its first letter... and if the entries are sorted alphabetically
as they should be... the listbox will jump to the first entry starting with
that letter.
Signature

            John W. Vinson [MVP]

Max Moor - 15 Feb 2008 07:12 GMT
>>Hi All,
>>
[quoted text clipped - 8 lines]
> alphabetically as they should be... the listbox will jump to the first
> entry starting with that letter.

Hi John,

       I'm sorry, I should have said, I need to make the box scroll to the
record from VB.

       With a single select box, I use to search the list for the record I
wanted, then set the value to it, and the box would scroll to it.  This
doesn't work for the multi-select type, because I can't use the bound
column that way.

- Max
John W. Vinson - 15 Feb 2008 16:27 GMT
>        I'm sorry, I should have said, I need to make the box scroll to the
>record from VB.
[quoted text clipped - 3 lines]
>doesn't work for the multi-select type, because I can't use the bound
>column that way.

I'm confused. A multiselect listbox doesn't have "a selected record" - it has
zero, one, several, or all selected. Scrolling to "the selected record" is
ambiguous or meaningless!

Could you explain what you're trying to accomplish from the user's point of
view? What is this listbox being use for, if not to allow the user to freely
select from the choices it displays?
Signature

            John W. Vinson [MVP]

Max Moor - 19 Feb 2008 20:25 GMT
> I'm confused. A multiselect listbox doesn't have "a selected record" -
> it has zero, one, several, or all selected. Scrolling to "the selected
[quoted text clipped - 3 lines]
> of view? What is this listbox being use for, if not to allow the user to
> freely select from the choices it displays?

Hi John,

       Sorry the reply was so long in coming.  This listbox is actually in
multiselect mode all the time, as far as Access is concerned.  I want it to
be dual duty however, and the multiselect property can't be changed in
code, so...

       I keep a software switch of my own for mode switching.  If in my
single select mode, when a click event occurs, I requery the main forms row
source to display the selected record's details.

       There are occasions when the user will want to group records to
process them together, rather than just updating the one record's details.  
In this mutiselect mode, I don't refresh the main form while selection of
records is being done, and switch right back to single mode as soon as the
selections are processed.

       This all works fine, and, although sounds a little convoluted, makes
for a very smooth UI for this form.

       There is also a need to search the records in the listbox recordset,
when in single mode, and move to the found record. Also, there are times in
single mode, when the user changes a piece of detail information on the
selected record that warrants the list being resorted or requeried.

       Finding a desired record or going back to the active record after a
requery isn't hard.  Once found, I can make a record be selected with the
selected property.  If the active record doesn't just happen to be in the
top few rows of the listbox, it's not displayed, though.  I want to be able
to make the listbox scroll to any single selected record.

       Ah, but can it be done?

- Max
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.