Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox - records not on view

Status
Not open for further replies.

ShinyPen

MIS
Nov 6, 2002
10
0
0
GB
I have a listbox that can display 4 rows of data before the scroll bar is show.

Lets say my listbox.rowsource returns 6 rows.

What I am wondering is:

Is there a way to update a label on my form with the number of records "above" and "below" what the listbox is currently displaying. i.e. "2 more records to display" underneath the listbox. I want this to change as the user scrolls through.

Thanks in advance for any help!
 
You can use the .listcount property of the listbox to return how many rows there are in a listbox, then some simple math:


[tt]me!lblMyLabel.caption=me!lstList.listcount-4 & "your text..."[/tt]

Roy-Vidar
 
- didn't read the question thoroughly, the scrolling thing, I don't know, but if it can be done, it can probably be found at Lebans or TheAccessWeb

Roy-Vidar
 
Thanks for the reply Roy-Vidar.

Ideally I'd like the label to update when the user scrolls down one record. Then the label below would read "1 more rec below" and the label above could read "1 more rec above".

The problem is, no ListIndex is changed when the user simply scrolls down the box. Thus, I have no way of knowing where they are in the box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top