Locked lesson.
About this lesson
Change sort to group using the Group Sort and Total pane, and change the Default View of a report to Print Preview.
Exercise files
Download this lesson’s related exercise files.
Services_32_Start Sort_to_Group.accdb1.7 MB Services_32_Sort_to_Group.accdb
2 MB
Quick reference
Change Sort to Group, Set Default View to Print Preview
Application Terminology
Property Sheet for Multiple Selection
When you select multiple controls, the Property Sheet shows the properties that they have in common. If the values are also the same, the property sheet shows them as well. If a property is blank, that means that all the controls have it, but the property values are different or values are not specified.
Font Weight Property
The Font Weight property determines if a control is normal or if the stroke is heavier or lighter.
When you apply bold using the ribbon or , the Font Weight property is set to Bold.
Fore Color Property
The Fore Color property of a control is the color of its text.
Steps
Change Sort to Group
- To change sort to group, turn on the Group Sort and Total pane if it is not showing by clicking Group & Sort on the Design ribbon
- Click More
on the Sort line
- set "with a header section"
- and/or "with a footer section"
To avoid a group header from being printed on one page and detail on the next, change "do not keep together on one page" to "keep header and first record together on one page". If you do not have much detail, you may wish to choose "keep whole group together on one page".
Maximize Window
- To maximize a window, double-click its title bar. You can also click the maximize button in the upper right corner next to X, but the title bar is a bigger target so double-clicking it is quicker.
Change Default View of a Report to Print Preview
- To change the Default View of a report to Print Preview, go to the Design View of the Report.
- Click where the rulers intersect in the upper left to select the report.
- On the Property Sheet (Format tab) for the Report, change the Default View from Report View to Print Preview.
Change Control Type
- To change a control type, right-click on it
- From the shortcut menu, choose Change To
- Pick the control type you want.
Move Controls Using Arrows
- To move controls using the arrow keys, select the control(s) you want to move
- Press the desired arrow keys --
,
,
,
Resize Controls Using Arrows
- To resize controls using the arrow keys, select the control(s) you want to resize
- Press Shift and the desired arrow keys --
,
,
,
Login to download
- 00:04 This is Lesson 32 of Access 2013.
- 00:09 The difference between Sorting and Grouping
- 00:12 is that fields that are grouped have a header or footer section.
- 00:17 We are going to change a Sort field to a Group field
- 00:20 in the report we have spent the last several lessons designing.
- 00:24 Hello, this is Crystal.
- 00:27 When you look at the Customer Services by Year report,
- 00:30 you see a running sum at the end of each detail row.
- 00:34 What we are missing is the ability
- 00:36 to see a total amount for each service.
- 00:40 We can easily get this information
- 00:42 by changing the Sort for the service name to a group.
- 00:46 Go to the Design View of r_CustomerServicesByYear.
- 00:51 Turn on the Group, Sort, and Total pane
- 00:54 if it is not showing on the bottom
- 00:56 by cicking Group & Sort on the DESIGN ribbon.
- 01:01 Collapse the ribbon by double-clicking
- 01:02 on one of the tabs to give yourself more space.
- 01:06 In the Group, Sort, and Total pane,
- 01:08 click on Sort by ServName
- 01:10 and click More > to show the rest of the options.
- 01:14 Change "without a header section" to "with a header section".
- 01:19 Change "without a footer section" to "with a footer section"
- 01:25 Change "do not keep together on one page" to
- 01:28 "keep header and first record together on one page".
- 01:33 You can see that Access has added additional sections.
- 01:37 Close the Group, Sort, and Total pane
- 01:39 by clicking X in its upper right corner.
- 01:43 If you are not maximized,
- 01:44 double-click on the report titlebar to maximize.
- 01:49 Drag the ServName control
- 01:51 from the Detail section to the ServName Header section.
- 01:56 Copy the calculated sum controls and the label in the
- 01:59 Report Footer section to the ServName Footer section.
- 02:04 Right-click on the label that says Grand Totals in the
- 02:07 ServName Footer section and change it to a textbox.
- 02:12 Click where it says Unbound and type
- 02:15 =Servname & " Totals" [and press ENTER].
- 02:26 Make the control wider by dragging the right side handle.
- 02:31 In the Page Header section, delete the label for Service,
- 02:34 and select the remaining visible labels.
- 02:37 Shift-click and drag the textboxes in the Detail section,
- 02:41 then shift-click, or shift-click-and-drag the calculations
- 02:44 in the group footer sections.
- 02:47 The reason we are doing it this way instead of
- 02:50 surrounding them is because we do not want to
- 02:53 include the lines in the selection.
- 02:56 Move the selected controls to the left
- 02:58 using the Left-Arrow key or by dragging.
- 03:01 Save the report and look at the Print Preview.
- 03:05 The service name is printed once at the top of each group.
- 03:10 The running sum still works as expected,
- 03:12 starting over again when the group changes.
- 03:15 We don't really have enough room, however,
- 03:18 to repeat the service name in the subtotal row
- 03:21 without it possibly going into the total under the time.
- 03:25 Go back to the Design View
- 03:27 and delete the textbox label in the ServName footer.
- 03:32 Select the sum of WsTime in the ServName footer,
- 03:35 and WsTime in the Detail section
- 03:38 and use the QAT to align them.
- 03:42 Do the same for the calculated amount.
- 03:45 Hmm, the calculated amount textboxes
- 03:48 appear to be different widths.
- 03:53 Select all the textboxes based on CalcAmt
- 03:56 and set the Width property to 1 inch.
- 03:59 Use the Right-Align icon on the QAT to line them up.
- 04:04 Copy one of the labels from a group footer
- 04:06 into the ServName Footer
- 04:08 and change the Caption to Service Totals.
- 04:12 Select the ServName textbox
- 04:15 in the ServName Header section
- 04:17 and set the Border Style to Transparent
- 04:19 on the Property Sheet.
- 04:22 Set Repeat Section to Yes for the ServName Header section.
- 04:28 We keep on having to select Print Preview
- 04:31 from the View drop-down.
- 04:33 Notice the icon in the Views group is the Report View icon.
- 04:38 Click where the rulers intersect
- 04:40 in the upper left to select the report.
- 04:43 On the Property Sheet for the Report,
- 04:45 the Default View is set to Report View.
- 04:49 Change the Default View to Print Preview
- 04:52 and notice that the ribbon changes too.
- 04:55 Now it is just one click to get to Print Preview, which is faster.
- 05:01 Select the Running Sum label and notice that
- 05:03 the Width property is 0.85".
- 05:08 When you select multiple controls, the Property Sheet shows
- 05:12 the properties that they have in common.
- 05:15 If the values are also the same,
- 05:17 the property sheet shows them as well.
- 05:20 Font Weight is blank because
- 05:23 one of the selected controls is bold and the other is not.
- 05:27 Set the Width for the Running Sum label to also be 1".
- 05:32 Change the Fore Color of the controls
- 05:35 in the ServName footer to blue.
- 05:38 The subtotals are easier to distinguish on the Print Preview.
- 05:43 The Report Header section is currently empty and closed.
- 05:47 In the next lesson, we will add controls containing key fields
- 05:51 to this section and hide it.
Lesson notes are only available for subscribers.