Question

Locked

Access 2003 Sorting and Grouping ?

By michael.erskine.ctr ·
I am sorting by "week" in a report on the creation date field that renders all records when I run the report(even records over a week old). I have double checked all aspects of this database. It is a very simple database with NO PROGRAMMING or Macros.

If I need to resort to VBA or Macros so beit.

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

What are you trying to filter out or sort?

by georgeou In reply to Access 2003 Sorting and G ...

You can easily sort things out using Access 2003 built-in query capability. You can literally drag and drop the fields in to the editor and select how you want to filter or sort the data.

Collapse -

Reply to What are you trying to filter out or sort?

by michael.erskine.ctr In reply to What are you trying to fi ...

I am trying to retrieve the last seven days of records and only the last seven. When I tried to use the query only I couldnot getit to work however, when I used the Sorting and Grouping in the report itself it seemed to work until the records older than seven days started to pop up.

Collapse -

Try this for "criteria"

by georgeou In reply to Reply to What are you try ...

Try this for "criteria" for the "Date" column in the Query editor.
Date()-7)

This gives you the last 7 days. If you want before the last 7 days, use a < instead of the >. You can obviously adjust the 7 day value as well.

Collapse -

Reply to Try this for criteria

by michael.erskine.ctr In reply to Try this for "criteria"

that worked for the 7 days and the acid test for 30 days is coming up...thank you very much for your help on this issue.

Another question...where is the syntax for the formatting of criteria like this?

I tried date()-7 without the ) around the statement and of course it did not work.

Collapse -

I just guessed it since you need to enclose the entire argument

by georgeou In reply to Reply to Try this for cri ...

If you dind't use the outer (), then you're doing > the current date operation first and then subtracting that by 7. If in doubt, use the () to enclose your arguments to force the proper order execution.

Collapse -

Thanks again for your help!

by michael.erskine.ctr In reply to I just guessed it since y ...

Thank You George!

Back to Software Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums