Brain cramp! setting value of multiselect list
- From: Dale Fye <dale.fye@xxxxxxxxxx>
- Date: Mon, 26 Jan 2009 10:44:41 -0800
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.
--
Dale
email address is invalid
Please reply to newsgroup only.
.
- Follow-Ups:
- Re: Brain cramp! setting value of multiselect list
- From: Peter Hibbs
- Re: Brain cramp! setting value of multiselect list
- From: Dirk Goldgar
- Re: Brain cramp! setting value of multiselect list
- Prev by Date: Exporting an access query to a excel template
- Next by Date: RE: Multiple criteria taken from 2 seperate forms
- Previous by thread: Exporting an access query to a excel template
- Next by thread: Re: Brain cramp! setting value of multiselect list
- Index(es):
Relevant Pages
|