Access™ 2007 VBA Programmer's Reference
by Teresa Hennig, Rob Cooper, Geoffrey Griffith, Armen Stein
11.2. Creating a Report
There are many ways to create a report in Access 2007, including the following:
Using Report Wizard: The Report Wizard walks you through a report creation process with a number of options from which to choose. The options include data settings such as data source, grouping, and sorting, and formatting options such as layout, orientation, and style. Using the wizard is also an easy way to create reports using multiple tables.
Using Report Designer: Using the Report Designer gives you the most control over report creation. You can place any type of control on the design surface and bind the report to a table or query. The Report Designer also enables you to add VBA code behind the report.
Programmatically: You can create reports with code. Access provides a method on the Application object appropriately called CreateReport, which can be used to create a report. This method is largely used when you want to create reports using your own mechanism for gathering input from the user.
Using Layout view: The Report Designer offers a powerful way to create reports. However, as you design your reports, you may frequently need to switch between Print Preview and report design because data from the tables is not shown at design time. Layout view, as mentioned earlier, was created to solve this. With it, you can make changes such as sorting and grouping, adding totals, or applying formatting while viewing the actual data from a table or query.
Using Quick Reports: Click ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access