Using several listboxes with 1 vertical scrollbar (result of query) 
Author Message
 Using several listboxes with 1 vertical scrollbar (result of query)

Hi.
  I have a problem using listboxes for displaying the result of a query.  I
have 7 listboxes wich contains the result of a SQL-query.
The problem:
    - when running the query, the listboxes gets a vertical scrollbar when
the result is bigger than the design of the listbox (this is normal).  When
I scroll the first listbox, the rest of the listboxes is unaffected by the
scrolling.

Is there a way to make 1 vertical scrollbar to controll ALL the listboxes??
In my code I fill the listboxes this way:
    listbox1.additem rstTemp!1st_result1
    listbox2.additem rstTemp!1st_result2
    listbox3.additem rstTemp!1st_result3
    ..
rstTemp is a temp. recordset.

Please......I'm gettin desperate....

Best regards
Ole Peder Teigen



Mon, 18 Feb 2002 03:00:00 GMT  
 Using several listboxes with 1 vertical scrollbar (result of query)
If you're using a unique number ref in your tables and each of the list
boxes has that unique ref either in the ItemData or as the index then I
presume that as you click on the first list box and return it's ref then you
can at least move to the same record in the other list boxes. Not a very
good solution I'm afraid.

--
Tom Sowler
VB Code Samples & VB Utilities
http://www.tigerbites.com/



Mon, 18 Feb 2002 03:00:00 GMT  
 Using several listboxes with 1 vertical scrollbar (result of query)
In the Scroll event of the first listbox, set the TopIndex of each of the
other listboxes to the Topindex value of the first.

Lee Weiner
weiner AT fuse DOT net
http://home.fuse.net/lweiner


Quote:

>Hi.
>  I have a problem using listboxes for displaying the result of a query.  I
>have 7 listboxes wich contains the result of a SQL-query.
>The problem:
>    - when running the query, the listboxes gets a vertical scrollbar when
>the result is bigger than the design of the listbox (this is normal).  When
>I scroll the first listbox, the rest of the listboxes is unaffected by the
>scrolling.

>Is there a way to make 1 vertical scrollbar to controll ALL the listboxes??
>In my code I fill the listboxes this way:
>    listbox1.additem rstTemp!1st_result1
>    listbox2.additem rstTemp!1st_result2
>    listbox3.additem rstTemp!1st_result3
>    ..
>rstTemp is a temp. recordset.

>Please......I'm gettin desperate....

>Best regards
>Ole Peder Teigen



Mon, 18 Feb 2002 03:00:00 GMT  
 Using several listboxes with 1 vertical scrollbar (result of query)
Thank you so very much!!!! Problem solved thanks to U  :)

Bes regds
Teigen

Lee J. Weiner skrev i meldingen ...

Quote:
>In the Scroll event of the first listbox, set the TopIndex of each of the
>other listboxes to the Topindex value of the first.

>Lee Weiner
>weiner AT fuse DOT net
>http://home.fuse.net/lweiner



>>Hi.
>>  I have a problem using listboxes for displaying the result of a query.
I
>>have 7 listboxes wich contains the result of a SQL-query.
>>The problem:
>>    - when running the query, the listboxes gets a vertical scrollbar when
>>the result is bigger than the design of the listbox (this is normal).
When
>>I scroll the first listbox, the rest of the listboxes is unaffected by the
>>scrolling.

>>Is there a way to make 1 vertical scrollbar to controll ALL the
listboxes??
>>In my code I fill the listboxes this way:
>>    listbox1.additem rstTemp!1st_result1
>>    listbox2.additem rstTemp!1st_result2
>>    listbox3.additem rstTemp!1st_result3
>>    ..
>>rstTemp is a temp. recordset.

>>Please......I'm gettin desperate....

>>Best regards
>>Ole Peder Teigen



Mon, 18 Feb 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. help...with listbox's vertical scrollbar..

2. Creating Horizontal and Vertical scrollbar for ListBox

3. using a query result to run another query

4. Run Query based on Listbox results - text parsing?

5. putting the results of a query into a listbox

6. Datagrid Vertical Scrollbar

7. DataGrid Vertical ScrollBar Always On?

8. vertical scrollbar

9. Controling Vertical Scrollbar

10. ListView sorting with vertical scrollbar.

11. PictureBox and Vertical, Horizontal ScrollBar

12. Question: Optional vertical scrollbar and textbox?

 

 
Powered by phpBB® Forum Software