Solved

ListBox in Access

Posted on 2014-03-18
10
525 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

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

Expert Comment

by:Dale Fye (Access MVP)
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

740 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