• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 560
  • 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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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