How do you set the default scroll of an MS access listbox to be top -
i have multi-select listbox on ms access form 2010, have routine selects default values this
= 0 categorieslist.listcount - 1 if instr(1, ",2,3,17,6,22,13,10,48,39,18,", ("," & categorieslist.itemdata(i) & ",")) categorieslist.selected(i) = true end if next which works perfectly, thing listbox has height of 3 items, , has 48 iems total, once above routine, list box shows last 3 items default (scrolls bottom)
how make listbox scroll top default?
to this, without having set focus listbox, loop through list items in reverse. since code end on first item, listbox scrolled top:
= (categorieslist.listcount - 1) 0 step -1 if instr(1, ",2,3,17,6,22,13,10,48,39,18,", ("," & categorieslist.itemdata(i) & ",")) categorieslist.selected(i) = true end if next
Comments
Post a Comment