Change the sort on a Report Grouping w/VBA

S

Scott

Currently we have a report that changes it's Grouping of the report
programmatically when the report opens using:

Me.GroupLevel(0).ControlSource = "Vendor"

However I would also like to specify the sorting of the Grouping to be
either Ascending or Descending using VBA but I could not find the syntax for
it. Does anyone know of an example or what the property is? Thanks.
 
M

Marshall Barton

Scott said:
Currently we have a report that changes it's Grouping of the report
programmatically when the report opens using:

Me.GroupLevel(0).ControlSource = "Vendor"

However I would also like to specify the sorting of the Grouping to be
either Ascending or Descending using VBA but I could not find the syntax for
it. Does anyone know of an example or what the property is? Thanks.

For Descending sort:
Me.GroupLevel(0).SortOrder = True

and for Ascending:
Me.GroupLevel(0).SortOrder = False
 
S

Scott N. Weber

ya know I looked at that property but it wasn't obvious what to do. Thanks
Marsh!!!
 

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