Avatar of ewingdj
ewingdj
Flag for United States of America asked on

Determine the topmost index of a listbox.

I'm using Access 2003 and realize that the topIndex method for a listbox does not work. Is there any other way to determine the topmost index value of a listbox as you scroll through the list?
Visual Basic ClassicMicrosoft Development

Avatar of undefined
Last Comment
Dana Seaman

8/22/2022 - Mon
Mike Tomlinson

Can you explain further how it "doesn't work"?...or are you tyring to get the TopIndex DURING an ongoing scroll by the User?
Arthur_Wood

Do you mean the Index of the topmost Listbox Item that is displayed, as items are scrolled off the top, when you scroll down the list?  

You must keep that pointer in your code, by incrementing a variable (TopIndex for example), every time you scroll the listbox down by one posistion, and decrementing the pointer when you scroll the list box back up by one position.

AW
ASKER CERTIFIED SOLUTION
Dana Seaman

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy