• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 562
  • Last Modified:

ListBox in Access

Have a Query that is the record source for a ListBox on a Form in Access that lists thousands of rows.
Query retrieves rows in sorted order, but it is very lengthy to scroll through.
Like the ListBox because item(s) can be selected thus avoiding data entry errors.
Just seeking some method that would make scrolling through a lengthy ListBox less painful.
0
clock1
Asked:
clock1
  • 5
  • 4
1 Solution
 
COACHMAN99Commented:
Is your query sorted? and does the sort field have an index in the table?
0
 
clock1Author Commented:
Query is sorted. No index.
0
 
COACHMAN99Commented:
index will help. are you sorting strings or IDs?
extreme alternative is copy the two columns into a local temp table and use that as the source - need to refresh content where applicable.
0
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
clock1Author Commented:
Sorting strings. Not familiar with index. Is that set in the query somewhere?
0
 
Dale FyeCommented:
Another option would be a subform containing a datasheet of the two columns.

With the datasheet, you would get the benefits of the right click, which gives you filtering capabilites.

Combine that with the temp table Coachman99 mentioned if you want to be able to select more than one item from the subform.  To do this, you would also have to add a number field, populate it with 0's to start, and then create a checkbox control on the datasheet form.
0
 
COACHMAN99Commented:
index is set on fields in table-design. Index the field you wish to sort on.
0
 
clock1Author Commented:
Sorted field used in query is a Expression (calculated) field.  Might have to introduce type-ahead function that progresses the list in sync with key stroke.  Wish me good luck.
0
 
COACHMAN99Commented:
or use the sorted query to populate a local table (with an index) as the datasource
good luck :-)
0
 
clock1Author Commented:
Resolved using a text field on the form that passes a value to a parameter query. Uses Access query engine to produce desired result.
0
 
clock1Author Commented:
The solution involves:

One text field.
One Parameter query.
One On Enter Event to Requery.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now