Itemdata in listbox

N

Norbert Meiss

I want to highlight the next item in a listbox (not multiselect). This works
fine with this line. The textfield contains the last ListIndex.

Me.lst1 = Me.lst1.ItemData(Me.txtListIndex + 1)

In somes rare cases the selection jumps to the entry before the last one and
not to the next. I have to mention that the first column contains a key which
is not unique. Could that be the reason for the strange behaviour?

TIA,
Norbert
 
J

John Spencer

Yes, that is probably the reason.


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top