D
Dale Fye
I've got a listbox that I'm using for several purposes, based on several of
the other controls on a form. I had thought about using multiple lists (some
multi-select, others single-select), but after working through the number of
combinations of functionality, decided it would take about 6 different lists,
and decided to try using one list instead.
Depending on the selections in a couple of combo boxes, I wanted to display
different fields (just change the column widths - this works fine).
In other instances, I need to switch between multi-select and single-select
(obviously this is a problem). I've worked out a way to ensure that only a
single item is selected when I want the single select functionality.
However, in one instance I have to requery the list, and after the requery, I
want to highlight the single row that was highlighted prior to the requery.
Since I cannot set the listindex, I'm using:
intListIndex = lst.listindex
lst.requery
lst.Selected(intListIndex) = true
debug.print lst.listindex
which works to highlight the previously highlighted row. However, after the
requery and the next line of code, the lists listindex property shows -1.
Is there any way to get the lists listindex property to reflect the previous
value?
I'm about ready to go back to the drawing board and resort to multiple
lists, but thought I'd check with you guyst first.
Thanks.
the other controls on a form. I had thought about using multiple lists (some
multi-select, others single-select), but after working through the number of
combinations of functionality, decided it would take about 6 different lists,
and decided to try using one list instead.
Depending on the selections in a couple of combo boxes, I wanted to display
different fields (just change the column widths - this works fine).
In other instances, I need to switch between multi-select and single-select
(obviously this is a problem). I've worked out a way to ensure that only a
single item is selected when I want the single select functionality.
However, in one instance I have to requery the list, and after the requery, I
want to highlight the single row that was highlighted prior to the requery.
Since I cannot set the listindex, I'm using:
intListIndex = lst.listindex
lst.requery
lst.Selected(intListIndex) = true
debug.print lst.listindex
which works to highlight the previously highlighted row. However, after the
requery and the next line of code, the lists listindex property shows -1.
Is there any way to get the lists listindex property to reflect the previous
value?
I'm about ready to go back to the drawing board and resort to multiple
lists, but thought I'd check with you guyst first.
Thanks.