Advice Needed

striker

Useless and getting worse
Local time
Today, 19:42
Joined
Apr 4, 2002
Messages
65
I have a requirement to produce a query, where a user needs to select from 1 to 500 (and any combination in between) products from a table of 500 part numbers. I want to use the selected part number(s) as the criteria for a query. I have tried using a multi-select list box and using the In() method for getting the criteria into my query. This method works but scrolling through a 500 item list is somewhat slow and looks very messy.

My reason for wanting the user to select the numbers is to avoid typo's in the query criteria.

Any query guru's out ther got any other ideas on how to tackle this.

Thanks in advance for your time and assistance.
 
Create a second table called something like "SelectedPartNums". Use code behind the form to insert PartNums into this table from a listbox or whatever control you want.

You will need some command button to clear out the table by running a delete query.

Create a query that joins SelectedPartNums to your primary table.

Flexible and probably more efficient that generating an "In" list.

HTH,
RichM
 
Its not the actual query part I have a real problem with, its how to select the criteria data itself ie the scrolling through 500 part numbers. Each part number is 14 characters long and not all are consecutive.
 
you wrote:
<<
Its not the actual query part I have a real problem with, its how to select the criteria data itself ie the scrolling through 500 part numbers. Each part number is 14 characters long and not all are consecutive.
>>

Sounds like you want to post this question in the "Forms" area. If you want to present the user a list of 500 part numbers then they will have to scroll through 500 lines won't they ?

There is a property of combo boxes called "Auto Expand". Check Access Help for this topic.

RichM
 

Users who are viewing this thread

Back
Top Bottom