I need to sort some records in a report by a particular order.

M

MagPie1974

I need to sort items from a table into a report, but it cannot be sorted
ascending or descending. It is based upon the sections. I don't want to
label each section a number in order to do it. Any suggestions?
 
D

Douglas J. Steele

Create a table that has the section names and the sort order and then create
a query that joins the new table to your existing table. Use the query for
your report, and sort on the sort order field from the new table.
 
F

fibre_SSP

How many sections do you have?

If you have just a few, then you could base your report on a query.
Then you could define a field in your query that uses an if statement
to set the sort order. Then you could sort your report on Sortoption.

SortOption:If([Section]="Section1",1,if([Section]="Section2",2,3))

Another thing that you could do is define a new MS Access table with
two fields. The first field would be used to store all your section
names. The second field, would be an integer to store the order that
you want to sort these sections. You would then have to type the name
of each section into the table along with a number to represent how you
would like to sort. Then, in a query you could link your main table to
your new section table by the Section description fields. You would
then add the sort field from the new section table. Finally, you would
base your report on this query and sort by the section sort field.

Does that make sense?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top