Weird Listbox Thumbtack problem

edonahue

Registered User.
Local time
Today, 00:21
Joined
Apr 6, 2000
Messages
15
I have a list box on a form that runs a query returning 1315 records. If I click on the down arrow at the bottom of the vertical scroll bar the list box works fine. But if I click in the vertical scroll area, click and drag the thumbtack or click on a record I can't get beyond about 24 records (I get a different number of records if I drag the thumbtack different distances before releasing).

Can anyone tell me what causes this and if anything can be done?

Thanks,

Erika Donahue
 
erika,

I think what's happening here is that Access is reluctant to traverse
your entire list -- unless it has to. If you drag the slide bar to the
bottom, does it bounce back up?

I think that when you open the listbox for the first time, you could:
Me.lstMyListBox.Selected(Me.lstMyListBox.ListCount - 1) = True
That would "force" Access to process all rows. You could immediately
"deselect" it afterwards.

That's a lot of records for a listbox. Is there a chance that you
could use something like the "cascading combos" you'll find here to
restrice the number of choices?

Wayne
 
Wayne,

That seems to be a great idea. I'm new at this and I'm afraid that I was able to implement the select and deselect, but now the scrolling in the box is frozen. It seems that I have to do something like selecting the listbox again, but I'm not sure how to do it.

Thanks for your help.

Erika
 
I'm getting there, I did a requery and the listbox scroll works again, but can you help me get it to to top of the list again?

Sorry to be a pest!

Erika
 
Erika,

Me.lstMyListBox.Selected(0) = True
Me.lstMyListBox.Selected(0) = False

Wayne
 
Wayne,

Thanks. Believe it or not, despite my ineptness I had tried that. The thumbtack remains at the bottom.

Private Sub Form_Open(Cancel As Integer)
Me.List9.Selected(Me.List9.ListCount - 1) = True
Me.List9.Selected(Me.List9.ListCount - 1) = False
Me.List9.Selected(0) = True
Me.List9.Selected(0) = False
DoCmd.Requery
End Sub

I'll keep hacking away at it, but if you think of anything else it would be greatly appreciated.

Thanks,

Erika
 
Erika,

Don't Requery!

I starts the process all over again!

Post a sample db, or I'll try to recreate one in a while. Must hang ceiling
fans first. It's hot here!

Wayne
 
Erika,

All done now. Made a sample db with a little over 5,000 items.
Works OK, just don't requery.

Wayne
 

Users who are viewing this thread

Back
Top Bottom