2 part question - sorting by different fields for report

S

SteveP

I have a DB that has started being used by many different departments of the
company I work in. User input has shown that almost every area that looks at
the gathered information would like to be able to sort by 2 different fields.

1. Item/Part # - want to be able to sort by a single part number to
determine how often that part has had issues in the past.

2. Date - either limiting the Item/Part # by a certain date, or seeing all
of the part #s that have been entered over a certain period of time.

I have very limited/extremely basic report writing experience, so any and
all help is greatly appreciated. Thank you.
 
K

KARL DEWEY

Reports ignore sorts accomplished in a query, so you must use the Sorting and
Grouping done in the report.
You need to have a form to initiate the report. In the form have an option
group to select the different sorts. NOTE - an option group select will
result in a number based on what button is pushed.
In the query that is the source for the report add a field named Sort_Field.
Use this field in the report Sorting and Grouping.
Have the Sort_Field look like this ---
Sort_Field: IIF([Forms]![YourForm]![Frame1] = 1, [YourFirstSortField1],
IIF([Forms]![YourForm]![Frame1] = 2, [YourFirstSortField2],
[YourFirstSortField3])
You can multiple field sorting by including both fields like this --
[YourFirstSortField4] & [YourFirstSortField3]

I hope I explained it enough for you to follow.
 

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