473,383 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How do I use SORT and FILTER feature on access 2003

222 100+
Dear,

Does MS access 2003 provide user to use the command sort and filter in a report ?

let us say I have many fields. User needs to choose each time a field to sort and then to print. Same idea to filter mode.

Any help would appreciated.


Thank you in advance.

WASSIM S DACCACHE
Jun 26 '08 #1
4 2698
Stewart Ross
2,545 Expert Mod 2GB
Hi Wassim. Access does not provide user-level sorting for reports; the sort order is built-in as part of the report's structure, determined by the Sorting and Grouping settings. These are changeable using VBA code, but not from a menu option the way form sorting can be done.

Similarly, user-level filtering is not a feature provided for reports as a menu option. It is a simple matter to apply a filter to a report in the OpenReport call statement, or to set a filter within the VBA calling routine and apply it at run-time, and the developer would normally provide the users with choices using a form to do so then open the report for the user, filtering at that stage.

-Stewart
Jun 28 '08 #2
wassimdaccache
222 100+
Hi Wassim. Access does not provide user-level sorting for reports; the sort order is built-in as part of the report's structure, determined by the Sorting and Grouping settings. These are changeable using VBA code, but not from a menu option the way form sorting can be done.

Similarly, user-level filtering is not a feature provided for reports as a menu option. It is a simple matter to apply a filter to a report in the OpenReport call statement, or to set a filter within the VBA calling routine and apply it at run-time, and the developer would normally provide the users with choices using a form to do so then open the report for the user, filtering at that stage.

-Stewart
Dear Stewart,
I appreciate your help.
Actually I have an IDEA and not able to implement.

The idea is to have a form and let user do all kinds of filter and sort( it is already done). after that a method to copy the source of the form modified by the user (sorted and filter) into the source of the report that I need to print.
It is possible to copy the source of a form and past it on a source of a report on access.?

By the way does access 2007 provide us sort as a menu option in a report ???

Thank you in advance.


WASSIM S DACCACHE
Jun 28 '08 #3
Stewart Ross
2,545 Expert Mod 2GB
Sorry, Wassim, but changing the recordset of a report cannot affect its sorting and grouping, which is 'hard wired' into the report when it is built. It can be changed under program control, but not by setting a new recordsource.

There are likely to be only two or three sorting variants of any one report, and in my opinion the easiest option is to save alternative versions of the completed report with different sorting and grouping, and open the appropriate report depending on the choice selected by the user.

-Stewart
Jun 28 '08 #4
ADezii
8,834 Expert 8TB
To a certain degree, you can pro-grammatically control Sort Orders for various Grouping Levels, as well as Grouping Options, as in:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Report_Open(Cancel As Integer)
  2.   'GroupLevel(0) = 1st Grouping Level
  3.   Me.GroupLevel(0).SortOrder = False       'Ascending Order
  4.   Me.GroupLevel(0).GroupOn = 0             'Each Value
  5.   Me.GroupLevel(0).GroupInterval = 1       'Each Value
  6.   Me.GroupLevel(0).KeepTogether = 1        'Whole group
  7. End Sub
Jun 28 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Matt | last post by:
Hi all, We recently upsized two Microsoft Access Databases to SQL. We're using an ADP (2002) as the front end. All the conversion issues have been resolved, except for one: Whenever we...
2
by: Sanders | last post by:
I inherited an Access database and I have not worked with Access for very long. I have a Form that goes through a bunch of different queries until it spits out a datasheet with all kinds of...
0
by: Malcolm Cook | last post by:
I've discovered: Using "File > Print Preview" in a form's datasheet view with a server Filter crashes access after previewing... ....that is, unless ServerFilterByForm has been turned off...
0
by: Mike O. | last post by:
MS Access 2003 "filter by form" has drop down lists that allow the user to select values for each field to filter by. However, once some values are selected,the remaining dropdown lists remain the...
4
by: Nhmiller | last post by:
This is directly from Access' Help: "About designing a query When you open a query in Design view, or open a form, report, or datasheet and show the Advanced Filter/Sort window (Advanced...
2
by: Tim Marshall | last post by:
The following is happening in two instances in A2003. The one I s\describe is the easiest one. Theme controls and autocorrupt have been turned off long ago. An unbound main form with a list...
3
by: rquinnan | last post by:
Good Evening all, I would greatly appreciate any assistance on this Access 2003 quandary I'm in. And I do apologize if this has been answered somewhere else, I didn't see one that addressed my...
2
by: Lenin Torres | last post by:
Hi everybody I have an Union Query that works fine. I used this query as the RecordSource for a Form. That Form is used as a subform in another form. Everything works fine, except for the "Filter...
6
by: Chris Zoper | last post by:
Hello, I have a form that shows a lot of records based on a passthrough query to a SQL Server database. I noticed that the Filter and the Sort property of the form do not properly work, often...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.