Re: Report Orderby and Groupby in VB
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Mon, 17 Jul 2006 19:34:14 -0500
RW wrote:
I have a report that needs to be grouped by the same field but sorted by
different fields. The group by field must be the last sorted field.
Report 1
Order by:
Field1
Field2
Field3
Field4
Field5 (also the GroupBy field)
Report 2
Order by:
Field9
Field10
Field5 (same field as 5 above and also grouped by)
In the vb, I assume I can use the following for Report 1:
Me.OrderBy = "Field1, Field 2, Field3, Field4, Field5" using actual field
names
Me.OrderByOn = True
and for report 2
Me.OrderBy ="Field9, Field10,Field5" again using actual field names
Me.OrderBy On = True
However, how do I Group by Field5? I have a header in the report for Field5.
If I remove this header, I lose the information in that section. This Group
by must be the last sort criteria.
The OrderBy property is overridden by the Sorting and
Grouping list. Put you sort fields in Sorting and Grouping
and you should get what you want.
--
Marsh
MVP [MS Access]
.
- Follow-Ups:
- Re: Report Orderby and Groupby in VB
- From: RW
- Re: Report Orderby and Groupby in VB
- Prev by Date: Re: Report Error With No Data
- Next by Date: memo field export missing text
- Previous by thread: Re: Report Error With No Data
- Next by thread: Re: Report Orderby and Groupby in VB
- Index(es):
Relevant Pages
|
|