Solved

ListBox in Access

Posted on 2014-03-18
10
535 Views
Last Modified: 2014-03-30
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
Comment
Question by:clock1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 39937411
Is your query sorted? and does the sort field have an index in the table?
0
 

Author Comment

by:clock1
ID: 39937494
Query is sorted. No index.
0
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 39937520
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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:clock1
ID: 39937529
Sorting strings. Not familiar with index. Is that set in the query somewhere?
0
 
LVL 48

Expert Comment

by:Dale Fye
ID: 39937531
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
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 39937536
index is set on fields in table-design. Index the field you wish to sort on.
0
 

Author Comment

by:clock1
ID: 39937566
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
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 39937577
or use the sorted query to populate a local table (with an index) as the datasource
good luck :-)
0
 

Accepted Solution

by:
clock1 earned 0 total points
ID: 39954646
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
 

Author Closing Comment

by:clock1
ID: 39964686
The solution involves:

One text field.
One Parameter query.
One On Enter Event to Requery.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question