Selecting a row in a multiselect listbox

yossarian

New member
Local time
Today, 22:13
Joined
Jul 6, 2007
Messages
1
Hi All.
I have been programming in Access for a while, but still spending much of my time hitting brick walls, and using clumsy workarounds ..

Recently I have changed the ListBox that my whole app is built around, from MultiSelect : None to Extended ... and bug by bug I have then had to fix the knock on effects of this throughout.

My current problem is that the line ...

Forms!ChooseCall.ChooseCallList = vGotoCallNo

... used to highlight and Go To the Row in the Listbox where the value in the bound column corresponds to the variable - but since becoming multiselect it no longer does.
I don't want to loop through all the rows with a FOR EACH, or FOR .. NEXT.
I'm sure there is a simple equivalent to the line above ... but I have yet to get it working.

Any advice gratefully received,
Y.
 
Just so you know - if you set the list box to multiselect (either type) you lose the "VALUE" property of the list box. It no longer functions the way you would expect. So, you can't set the list box value to something. You would need to find the list index of the item you want.
 
You could use a continuous form that has check boxes with each record you wish to select. When you selecte a button to move to wherever you are going after the selection(s) create a string of all the IDs, comma separated, and use it in a Filter that says ID in (string).
 

Users who are viewing this thread

Back
Top Bottom