ListBox

  • Thread starter Thread starter Dale Brown
  • Start date Start date
D

Dale Brown

I have a listbox on a form in a Access 2000 database. The listbox will
sometimes scroll through the whole list of items. Other times is stops and
does not let me scroll through the whole list. It is like it has lost part
of the information. Any ideas on what would cause this and how to fix it?
 
Dale said:
I have a listbox on a form in a Access 2000 database. The listbox will
sometimes scroll through the whole list of items. Other times is
stops and does not let me scroll through the whole list. It is like
it has lost part of the information. Any ideas on what would cause
this and how to fix it?

If you're talking about grabbing the "thumb" and pulling it down all the way
that will only work after the ListBox has retrieved all the rows in its
RowSource RecordSet. Something it won't do on its own if there are more than a
few pages of rows. Once you force it to the bottom then the thumb will react to
the entire list in real time.

You can force this in code by doing a RowCount on the ListBox.
 
Rick,

The list box had 40 items to display. What do you mean about forcing this by
setting the row count?
 
Dale said:
Rick,

The list box had 40 items to display. What do you mean about forcing
this by setting the row count?

When the form opens set a dummy variable to the ListCount property.

Dim var as integer
var = Me.ListBoxName.ListCount

In order to evaluate ListCount Access will be forced to retrieve all the rows.
I wouldn't think that this would be an issue with only 40 rows though.
 
Back
Top