Re: Find 'TopIndex' in a listbox



Sorry Ian,

Your reply ended up in my SPAM Email folder. I've emailed you the modified
MDB.


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"ians" <ians0131@xxxxxxxxxxx> wrote in message
news:1182163251.398572.250320@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Stephen

tried emailing you as you suggested, but maybe it got lost as spam.
Anyway i'd still be interested in your solution.
Thanks

ian

On Jun 8, 2:41 am, "Stephen Lebans" <ForEmailGotoMy.WebSite.-
WWWdotlebansdot...@xxxxxxxxxxxx> wrote:
I've added support for ListBox ScrollBars to the GetSetScrollBar
solution. I
haven't published it yet to my site. If you send me an EMail I'll trply
with
the updated MDB.
MyFirstN...@xxxxxxxxxxxxxx

--

HTH
Stephen Lebanshttp://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

"ians" <ians0...@xxxxxxxxxxx> wrote in message

news:1181217711.337384.197640@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Is there any way to find the ListIndex of the first items displayed in
a listbox that is partially scrolled (i.e. the equivalent ofTopIndex
for a VB listbox)?

I want to be able to redisplay the listbox at exactly the same
position after an event that causes the scrollbar to reset to the top.
I've seen Stephen Lebans method for setting the scrollbar so that a
specific item is at the top of the box, but what I don't see how to do
is find out what the item at the top of the box is before the
scrollbar resets - Stephen's examples rely on you knowing beforehand
the ListIndex of the row you want to display.

(Just to complicate thing, the listboxis resizable, so i don't know
how many rows it will display at runtime).

Thanks!

Ian




.



Relevant Pages

  • Re: Mouse Wheel
    ... Send me your MDB and I will have a look at it or you. ... Stephen Lebans ... Access Code, Tips and Tricks ... MouseWheel back on before you exit the current session! ...
    (microsoft.public.access.formscoding)
  • Re: Vertical Alignment
    ... You have to import the standard code module from my sample MDB to your own ... This code module contains the function VerticallyCenter. ... Access Code, Tips and Tricks ... "Stephen Lebans" wrote: ...
    (microsoft.public.access.reports)
  • Re: Saved by the Mouse
    ... Can you EMail me your MDB and I can have a look at it? ... Access Code, Tips and Tricks ... the dowloaded Zipped folder, along with a copy of my MDB; ... Stephen Lebans wrote: ...
    (microsoft.public.access.forms)
  • Re: Detect scrollbar on subform (urgent)
    ... Use the MouseUp event of the Form in Datasheet view. ... Access Code, Tips and Tricks ... Stephen Lebans wrote: ... Scrollbar is currently Visible or not but you might want to first retry ...
    (microsoft.public.access.modulesdaovba)
  • Re: How to scroll a MS-Access form with VBA
    ... >> or Get the current position of a ScrollBar Thumb for a Form. ... >> Stephen Lebans ... >> Access Code, Tips and Tricks ... >>> I'm looking for some VBA code to scroll the mainform. ...
    (microsoft.public.access.modulesdaovba)