• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 22. Taking Charge of Reports > Handling Grouping and Sorting Programmat...

Handling Grouping and Sorting Programmatically

You learned how to manually group and sort records in a report in Chapter 6, “Exploring Reports.” Wouldn’t it be nice to be able to group and sort on the fly? Having this functionality enables you to see what the report looks like before you go to the trouble of manually setting the grouping and sorting levels permanently in the report. Or, you can use the on-the-fly functionality to preview the report before printing it to see if the groups and sorting levels are satisfactory. Just press a button, and you see the results immediately.

Before you attempt to programmatically create a group level on which to group or sort in your report, you need to determine which group levels already exist. Otherwise, your code could duplicate a group level that is already there. The problem is that Access provides no straightforward method to determine whether a specified group level exists on a report. The same goes for sections. You can access group level properties with code like this:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint