Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Parameter Query and Sorting Results

Status
Not open for further replies.

rcorbett

Instructor
Nov 25, 2002
24
US
I have a multiple parameter query that allows me to enter multiple UnitId's and displays the corresponding info I request in the query. My question is this - I want the unitid's to display in the query and eventual report as I enter them into the parameter query. The unitid field is a primary key field in the table and keeps putting them in ascending order in the query and subsequent report. Anyone have a suggestions on how to force the results to display as entered in paramater query? Thank you.
 
You have no chance using a parameter query. The PK will rule and sort the records into PK sequence.

If you want to force a specifc sequence into the query you have to introduce another field to control the sequence.
You could consider creating a table which you use to enter your required values. The table would have an autonumber field and a single data entry field. You then use a query base on your current table Join-ed to the Sequence table and inlude the autonumber field in the output so that you can sort on it. That will deal with the query.
However you will probably find you have to impose the sort rule again in the report as reports take no notice of the sequence of their recordsource.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top