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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Special Sort. Need to print record in middle of table first

Status
Not open for further replies.

ISUTri

MIS
Mar 25, 2004
38
US
I have a query where I need to print a record that is located in the middle of the table first. I don't need to worry about any special sorting for the rest of the information. It's alphabetical the record starts with a "P" and there are 40 records within the table. I was wondering if there was a way I could get this record pulled first without having to manually sort it.
Thanks
 
A simple way to do this would be to:

-- Add an integer field to the table. Call this SortOrder
-- Set this field to the value 2 in every record, e.g. using an Update Query
-- Manually set this to 1 in your special record
-- Add this field to the query which provides the data to your report, and perform an ascending order sort on it.

Now, your 'special record' will appear first, followed by the other records in no specific order.

I hope this helps.

Bob Stubbs
 
Sounds like bad design. While you can certainly write a custom sort, are there any other characteristics of that record that could be selected?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top