Solved

ListBox in Access

Posted on 2014-03-18
10
473 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
  • 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
 

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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
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.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now