Sorting/Multiply Sorting

A

Alex Martinez

Hi,

I am using Access 2002 and I hoping someone can help me or point me to a
website for more information. Here is the scoop. I work for a reinsurance
company and I have a particular report that the users like, but they want
the option to have the report sorted their way. For example one user wants
to sort by Policy Number, another user by Policy Number and by Insured, or
another user Sort by Expiration date, Insured and Date of Claims Completed,
etc.. How can I do give the user this option without the user going into
design view and change things. I want the user to have the capability sort
any field they want. There has to be an elegant way without making several
different report by sort order? Also is there a filter capability I can do
on the report similiar to Excel?. Any tips or help will be appreciated.
Thank you in advance
 
M

Marshall Barton

Alex said:
I am using Access 2002 and I hoping someone can help me or point me to a
website for more information. Here is the scoop. I work for a reinsurance
company and I have a particular report that the users like, but they want
the option to have the report sorted their way. For example one user wants
to sort by Policy Number, another user by Policy Number and by Insured, or
another user Sort by Expiration date, Insured and Date of Claims Completed,
etc.. How can I do give the user this option without the user going into
design view and change things. I want the user to have the capability sort
any field they want. There has to be an elegant way without making several
different report by sort order? Also is there a filter capability I can do
on the report similiar to Excel?.


The obvious starting point to providing options to users is
to create a form where they can specify what they want.

Typically you would use text boxes for the filtering
information. You should use code in the procedure that's
used to open the report to construct the OpenForm method's
WhereCondition argument.

To allow users to specify the report's sort order, you have
to use code in the report's Open event procedure to set the
report's GroupLevel items. The GroupLevels must be preset
at design time, but can be changed at runtime in the open
event. Note that you can use a combo or list box with the
RowSourceType set to Field List so the users can select the
field(s?) to sort on.

If you need additional help with this, please ask a specific
question about one aspect of whatever problem you're having
trouble dealing with.
 

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