πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.databases.ms-access
2 messages
2 total messages Started by James Tue, 08 May 2001 19:27
Driving Me Nuts!!!
#535
Author: James
Date: Tue, 08 May 2001 19:27
20 lines
2651 bytes
Access reports do their own sorting based on the sort fields you specify in
the Sorting and Grouping dialog of a report.  The recordsource Order By
clause is then ignored.

My problem is the following:

In the application I am creating, I allow the user to choose which fields to
sort by...  I then use the following code in the Report_Open procedure...

Me.GroupLevel(0).ControlSource = field
Me.GroupLevel(1).ControlSource = field
Me.GroupLevel(2).ControlSource = field

This code changes the Sorting and Grouping order for the report, but
unfortunately it 'Groups By' instead of 'Orders By'.  I did a little
research and found that this only happens when dealing with reports.  (Not
queries, etc.) - Found this information in the VBA help.

Does anyone have any suggestions on how I can dynamically specify an "Order
By" clause to the Report when it opens?
Re: Driving Me Nuts!!!
#536
Author: Vincent Quesnoit
Date: Wed, 09 May 2001 10:24
32 lines
3170 bytes
The "group By" in the report just adds the group header and page footer to every
group. When you design the report you tend to put the fields that are grouped
upon in the group header, but this is not mandatory, and you can display them in
the detail section if you like.
If you set the report such that group headers and footers are not displayed, you
will get sorted records.

HTH,
Vincent

James a οΏ½crit :

> Access reports do their own sorting based on the sort fields you specify in
> the Sorting and Grouping dialog of a report.  The recordsource Order By
> clause is then ignored.
>
> My problem is the following:
>
> In the application I am creating, I allow the user to choose which fields to
> sort by...  I then use the following code in the Report_Open procedure...
>
> Me.GroupLevel(0).ControlSource = field
> Me.GroupLevel(1).ControlSource = field
> Me.GroupLevel(2).ControlSource = field
>
> This code changes the Sorting and Grouping order for the report, but
> unfortunately it 'Groups By' instead of 'Orders By'.  I did a little
> research and found that this only happens when dealing with reports.  (Not
> queries, etc.) - Found this information in the VBA help.
>
> Does anyone have any suggestions on how I can dynamically specify an "Order
> By" clause to the Report when it opens?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads