How To Create Report Access
Creating a Report | |
Report Design Fundamentals
Introduction
You can print data using a table or a form, but the favorite object to print records is the report. As mentioned in previous lessons, a report shares many characteristics with a form. Still, just like forms have some particular characteristcs, some aspects are uniques to reports.
Practical Learning: Introducing Reports
- Start Microsoft Access
- In the list of files, click College Park Auto-Repair1 from Lesson 23
Introduction to Report Creation
As we saw in Lesson 6, to quickly create a report, in the Navigation Pane, click a table to select it. Then, on the Ribbon, click Create. In the Reports section, click Report:
Another fast way is by using the Report Wizard. To start it, in the Reports section of the Create tab of the Ribbon, click the Report Wizard button. This would launch a wizard that you can simply follow (we already saw how to use the Report Wizard in Lesson 3).
To start a report as blank piece of paper, on the Ribbon click Create. In the Reports section, click the Blank Report button. To create the types of labels that are sometimes glued on an envelop or a paper folder, click the Labels button on the Ribbon.
Opening a Report
Like a form, a report can be displayed in different views but the report has more varieties. If a report exists already, in the Navigation Pane, it is represented by a green icon followed by the name of the report. The regular display of a report is called the Report View. To open a report whether it is currently closed or opened in a different view:
- In the Navigation Pane, right-click its name and click Open
- In the Navigation Pane, double-click the report
Like a form, once opened, a report is represented by a tab or a title bar (for an overlapped database) that displays its name. By its definition, a report is presented like a piece of paper. Therefore it uses a white background.
Introduction to Report Design
When it comes to report design, the rules to add and manipulate the controls are the same we reviewed for the form. We studied the techniques of control design from Lessons 6 and subsequent lessons. Although some of the issues concerned only forms, most of what involves design is the same for forms and reports.
Practical Learning: Starting a Report
- To start a new report, on the Ribbon, click Create
- In the Reports section, click Report Design
Field Insertion on Forms and Reports
Data on the controls of a form or report falls in three main categories: fields that directly originate from a table, an expression created as a combination of existing fields, and values independent of any field. Before or when creating a report, you can specify the table that holds the records. There are various ways you can do this. If you have already started a report and it is displaying in Design View but you did not yet select the table that holds the records, in the Data or the All tab of the Property Sheet of the report, click the arrow of the Record Source field and select the table from the list.
Practical Learning: Introducing Report Design
- Double-click the button at the intersection of the rulers to open the Property Sheet for the report
- In the Property Sheet, click the Data tab, click Record Source, then click the arrow of the combo box and select RepairOrders
- Right-click the title bar of the report and click Save
- Set the name of the report as RepairOrders and click OK
The Views of a Report
The Design View
To design a report, you must display it in Design View. To do this:
- If the report is currently closed, in the Navigation Pane, right-click the report and click Design View
- If the report is currently opened in a different view
- In the Navigation Pane, right-click the report and click Design View
- Right-click the tab or the title bar of the report and click Design View
- In the status bar, click the Design View button
- On the Ribbon and in the Home tab, click the arrow of the View button and click Design View
Here is an example of a(n empty) report in Design View:
As done for a form, in the Design View of a report, you can add, position, format, configure, and manipulate the necessary controls. Of course, you can also select objects from the Field List and add them to the report.
Practical Learning: Using the Design View of a Report
- In the Controls section of the Ribbon, click Add Existing Fields
- In the Field list, click ReceiptNumber
- Press and hold Shift
- Click ProblemDescription
- Release Shift
- Drag the selection to the Detail section of the report
The Print Preview
A good way to see what a printed report would look like is to preview it. Such a view is referred to as Print Preview. To preview a report:
- If the report is currently closed, in the Navigation Pane, right-click the report and click Print Preview
- If the report is currently opened in a different view
- In the Navigation Pane, right-click the report and click Print Preview
- Right the tab or the title bar of the report and click Print Preview
- In the status bar, click the Print Preview button
When a report appears in Print Preview, the Ribbon is made of only one tab:
To appear realistic, a report in print preview appears like a piece of paper with margins. Its body is filled with the data that would be printed. Here is an example:
The right side and the bottom-right side may display a scroll bar each. Like a form in regular Form View, the Print Preview of a report is equipped with navigation buttons. The functionality of these navigation buttons is as we described for a table or form.
After using the Print Preview, to close it, in the Close Preview section of the Ribbon, click the Close Print Preview button . This would display the report in the view it previously had.
Practical Learning: Checking the Print Preview of a Report
- Right-click the title bar of the report and click Print Preview.
Notice the Ribbon - To get out of the print preview, in the Close Preview section of the Ribbon, click the Close Print Preview button
The Report View
The Report View shows a report with its controls and the items in its sections but it does not show the margins:
To open a report in the Report View:
- If the report is currently closed or opened in a different view:
- In the Navigation Pane, right-click the report and click Open
- In the Navigation Pane, double-click the report
- In the Home tab of the Ribbon, click the View button
- If the rerport is currently opened in a different view:
- Right-click the tab or the title bar of the report and click Report View
- On the right side of the status bar, click the Report View button
- If the rerport is currently displaying in the Layout View or in Print Preview (not in the Design View), right-click the body of the report and click Report View
Unlike the Print Preview, the Report View does not distinguish where a section starts and where it ends.
Practical Learning: Seeing the Report View
- In the Navigation Pane, double-click the RepairOrders report
The Layout View
The Layout View of a report appears as a drawing board. It shows its title bar and its system buttons. In its body, it displays three dotted lines that represent the top section and the margins:
Like a Design View, you can use the Layout View to add and manipulate controls on a report.
Practical Learning: Seeing the Layout of a Report
- Right-click the title bar of the report and click Layout View
- Right-click an unoccupied area of the report and click Design View
- Double-click the button at the intersection of the rulers to open the Property Sheet
- In the Property Sheet, click the Format tab
The Sections of a Report
The Page Header and the Page Footer Sections
As seen for a form, the Design View of a report can be equipped with one or more sections. By default, the primary section is the Page Header. The page header is equivalent to the top section of a printeg piece of paper.
If you create a report using either the Blank Report or the Report Design options of the Reports section of the Ribbon, the report is automatically equipped with a Page Header sections.
As mentioned previously, the Page Header represents the top section of the printed paper. Therefore, when designing a report, put in the Page Header the objects or text you want to display on each top part of the printed paper. For example, you can put the common title or the page number in that section. That section is also typically used to display the title of a brochure or book.
The Detail Section
Like a form, the most fundamental part of a report is the Detail section. It holds the most controls of a report. In fact, a report can have only that section. If you create a report using one of the options from the Reports section of the Create tab of the Ribbon, the report would come equipped with various sections. To have only the Detail section, you can right-click the report and click the option of the sections to remove. You may end up with only the Detail section:
The Size of a Report
Like a form, a report has a size, which is the combination of its width and its height. When it comes to the height, each section has and controls its own vertical measure. As done for a form, to specify the height of a section:
- You can drag up or down the bottom border of the bar of the next section
- You can access the Property Sheet of that section and change the value of the Height property
As seen for a form, the height a report displays in Design View is the total height of its sections.
When it comes to the width of a report, all sections use the same measure. The width a report shows in Design View is the common width of its sections. Therefore, to specify the width of a report:
- You can drag left or right the right border of any section
- You can access the Property Sheet of the report and change the value of the Width property
To change both the height and the width of the report:
- You can drag left, up, right, or down the bottom-right corner of the lowest section
- You can access the Property Sheet of the report then change the values of both the Height and the Width fields
As seen for a form, you can specify any width youo want for a report, but this aspect is subject to the printer. Therefore, the width of a report should equal or narrower than a piece of paper (11" x 8.5"). If you set a width that is too high, Microsoft Access would warn you by displaying a green rectangle on the button at the intersection of the rulers:
Of course, the solution is to narrow the body of the report (to somewhere around Measure 8 of the horizontal ruler).
Practical Learning: Using the Detail Section of a Report
- On the report, click the button at the intersection of the rulers
- In the the Format tab of the Property Sheet, click Width and type 8
- Using what we learned in form/report design about moving, resizing, and formatting the controls, design the report as follows:
- Save the report
The Page Footer Section
A report can be equipped with a Page Footer. It represents the bottom part of a printed piece of paper. If you create a report using either the Blank Report or the Report Design button of the Ribbon, the report would automatically be equipped with a Page Footer section besides the Page Header side:
If you have a report that doesn't have these sections and you want to add them, right-click the report in Design View and click Page Header/Footer
Because the Page Footer represents the bottom part of each printed page, you can put on it the object(s) that would display on each page. For example, you can use it to display the date the report is being printed.
The Report Header
To create a book, a magazine, or a brochure, you may want to have a front cover. Such a section is handled by the Report Header section.
The Report Footer
If you are creating a report that should appear with many pages you may want the last page to have specific information or a particular design. To support thise, the report can be equipped with a Report Footer section. Normally, the Report Header and the Report Footer sections are added together:
If you create a report using either the Report or the Report Wizard options of the Reports section of the Ribbon, the report would be equipped with a Report Header and a Report Footer sections. If you have a report that doesn't have these sections and you want to add them, right-click the report in Design View and click Report Header/Footer .
As seen in the above screenshot, you can have a report that has a Report Header and a Report Footer sections without the Page Header and the Page Footer sections. If you have a Page Header and the Page Footer sections but don't want to show them on a printed paper, you can completely reduce their heights:
Otherwise, if you are creating a book or brochure that would represent a list of various items, you should equip it with all these five sections.
Reports and Windows Controls
Introduction
As mentioned when studying form and report design, when a report is in Design View, the Ribbon is equipped with a Controls section in its Design tab:
Some controls are not available for the report because such controls don't have any role in a report. An example is the Web Browser. Some other controls are available but you should really decide if you need them and why. Examples are the buttons (the Button and the Toggle Button) and the Attachment. Other than that, you can use the controls from the Ribbon to populate your report.
Practical Learning: Using the Page Header of a Report
- In the Controls section of the Ribbon, click the Label control and click below the Page Header of the report
- Type College Park Auto-Repair and press Enter
- In the Property Sheet, change the following characteristics:
Top: 0
Left: 2.0833
Font Name: Bodoni MT Black (if you don't have that font, select Times New Roman)
Font Size: 24
Fore Color: #0072BC - Double-click one of the borders of the label to resize it to fit its caption
- In the Controls section of the Ribbon, click the Line control and click in the Page Header section
- In the Property Sheet, change the following characteristics:
Top: 0.42
Left: 1.125
Width: 6 - In the Controls section of the Ribbon, click the Line control and click in the Page Header section
- In the Property Sheet, change the following characteristics:
Top: 0.4583
Left: 0.25
Width: 7.5
Border Width: 2 pt - Add a horizontal line below each row of text in the Detail section:
- In the Controls section of the Ribbon, click the Option Group and click the Detail ection of the report.
If the wizard comes up, click Cancel - Change the caption of the head label as Order Identification and make it cover the other controls
- Save the report
The Date and Time
If you want to show the current date and/or time on a report, use the Date and Time control from the Controls section of the Ribbon. We reviewed in Lesson 14 how to use it.
Practical Learning: Displaying DateTime on a Form
- In the Controls section of the Ribbon, click the Text Box and click the left side of the Page Report section
- Click the accompanying label and press Delete
- Click the newly added text box
- In the Property Sheet, click the All tab and change the following characteristics:
Name: txtDateTime
Control Source: =Now()
Format: dddd ", "mmmm dd", "yyyy" at "hh:nn:ss
Width: 4
Top: 0.0417
Left: 3
Top: 0.0833
Back Style: Transparent
Border Style: Transparent
Font Name: Times New Roman
Font Size: 12
Text Align: Left - Save the report
The Page Number
In a report meant to display various records on its many pages, you may want to display the page number. To do this, in the Controls section of the Design tab of the Ribbon, click Page Numbers and click the report. The Page Numbers dialog box would come up. Use the Page Numbers dialog box to specify what sentence would be used, and where, to display the page number. Once you are ready, click OK. The new label would be added to the Page Footer section of the report.
Practical Learning: Showing the Page Number on a Report
- In the Header/Footer section of the Ribbon, click the Page Numbers button
- In the Page Numbers dialog box, accept the Format and the Positions selections.
Click the arrow of the combo box and select Right - Click OK
- Move the newly added text box to the Page Footer section
- Close the report
- When asked whether you want to save, click Yes
Tabular Reports
Unlike a form, a report is primarily considered in a tabular layout. This is because a report is primarily equipped with Page Header section. If you position some controls, such as labels, on it, and add the necessary controls, such as text boxes and combo boxes, in the Detail section, the report would behave like a tabular form, that is, a continuous view of records. You can use this feature of reports to create a tabular report without having to configure it in the Property Sheet, as done form the form.
Probably the easiest way to create a tabular report is to use the Report Wizard. If you start the wizard, in its fourth page, the Tabular layout is selected by default. When you end the wizard, the labels would be automatically positioned in the Page Header section and the text boxes would be added to the Detail section.
Practical Learning: Creating a Tabular Report
- On the Ribbon, click File and click Open
- In the list of files, click StatesStatistics2 from Lesson 24
- On the Ribbon, click Create
- In the Reports section, click Report Design
- In the Property Sheet, click the Data tab and set the Record Source to States
- Save the report as Summary
- In the Tools section of the Ribbon, click Add Existing Fields
- In the Field List, double-click Abbreviation, StateName, AreaSqrMiles, AreaSqrKms, AdmissionUnionDate, AdmissionUnionOrder, Capital and Region
- Press Ctrl + A to select everything on the report
- On the Ribbon, click Arrange and click Tabular
- Click and hold the cross button on the left side of the labels in the Page Header section
- Drag to the left
- Click an unoccupied area of the report to dismiss the selection
- Drag the Abbreviation text tox to the top
- Press Ctrl + A to select everything on the report
- On the Ribbon, click Remove Layout
- Click inside the vertical rulers on the left side of the Detail section to select the text boxes
- On the Ribbon, click Format
- In the Control Formatting section of the Ribbon, click the arrow of the Shape Fill button and select Transparent
- In the Control Formatting section of the Ribbon, click the arrow of the Shape Outline button and select Transparent
- On the Ribbon, click Design
- In the Controls section of the Ribbon, click the Label control , click the Page Header section, and type Area and press Enter
- In the Controls section of the Ribbon, click the Label control , click the Page Header section, and type Union to Union and press Enter
- Press Ctrl + A to select everything on the report
- On the Ribbon, click Format
- While the controls are still selected, in the Font section of the Ribbon, in the Font combo box, select Garamond (otherwise, select Times New Roman)
- In the Font Size combo box, select 12
- Position the controls as follows:
- In the Controls section of the Ribbon, click the Line control and click in the Page Header section
- Position the line below the Area label
- In the Controls section of the Ribbon, click the Line control and click in the Page Header section
- Position the line below the Admission to Union label
- In the Controls section of the Ribbon, click the Line control and click in the Page Header section
- Position the line just above the Detail bar and set it width to 2pt
- In the Controls section of the Ribbon, click the Line control and click in the Page Header section
- Position the line below the text boxes in the Detail section
- Complete the design of the report as follows:
- Save the report
Sub-Reports
As you may know already, a sub-report is just a smaller version of a report, except that a sub-report is made to be displayed in the body of a report. And as you may know already, a sub-report is created in a tabular layout. The easiest way to create a report and its sub-report is by using the Report Wizard. Otherwise, you can create and design your sub-report any way you like.
When designing a sub-report, the controls that will be displayed on top should be positioned in the Report Header section. Then you can either completely shrink the Page Header and the Page Footer sections or you can remove them.
After creating a sub-report, you can add it to a report. Remember that, as seen for sub-forms, both the report and the sub-report must hold a relationship in which the report has a primary key field and the sub-report has the equivalent foreign key.
Practical Learning: Creating and Using a Sub-Report
- On the Ribbon, click File and click Open
- In the list of files, click College Park Auto-Repair1
- On the Ribbon, click Create and click Report Design
- In the All tab of the Property Sheet, set the Record Source to PartsUsed
- Save the report as srPartsUsed
- In the Tools section of the Ribbon, click Add Existing Fields
- In the Field list, double-click PartName, UnitPrice, and Quantity to add them to the report
- Double-click the button at the intersection of the rulers of the report
- In the Controls section of the Ribbon, click the Text Box and click in the Detail section of the report
- In the Property Sheet, click the All tab and change the following characteristics:
Name: txtSubTotal
Control Source: =[UnitPrice]*[Quantity]
Format: Fixed - Change the caption of the accompanying label to Sub-Total and press Enter
- On the Ribbon, click the Line
- Draw a horizontal line below the labels in the Report Header section
- On the Ribbon, click the Line
- Draw a horizontal line below the text boxes in the Detail section
- In the Controls section of the Ribbon, click the Text Box and click the Report Footer section
- In the Property Sheet, click the All tab and change the following characteristics:
Name: txtSubTotals
Control Source: =Sum([UnitPrice]*[Quantity]) - Complete the design of the report as follows:
- Save and close the report
- In the Navigation Pane, right-click the RepairOrders report and click Design View
- From the Navigation Pane, drag srPartsUsed and drop it on an unoccupied area of the report
- In the Controls section of the Ribbon, click the Option Group and click the Detail ection of the report.
If the wizard comes up, click Cancel - Change the caption of the head label as Parts Used
- Position the group box so ther controls
- On the Ribbon, click Create and click Report Design
- In the Property Sheet, set the Record Source to JobsPerformed
- Save the report as srJobsPerformed
- In the Tools section of the Ribbon, click Add Existing Fields
- In the Field list, double-click JobName and Cost to add them to the report
- On the Ribbon, click the Design tab and click the Line
- Draw a horizontal line in the Report Header section
- On the Ribbon, click the Line
- Draw a horizontal line in the Detail section
- In the Controls section of the Ribbon, click the Text Box and click the Report Footer section
- In the Property Sheet, click the All tab and change the following characteristics:
Name: txtJobPrices
Control Source: =Sum(Nz([Cost])) - Complete the design of the report as follows:
- Save and close the sub-report
- In the same way, drag srPartsUsed and drop it on an unoccupied area of the report
- In the Tools section of the Ribbon, click Add Existing Field
- In the Field list, click DropOfDateTime
- Press and hold Ctrl
- Click , OrderCompletedDateTime, TaxRate, and Recommendations
- Release Ctrl
- Drag the selection to an empty area on the report
- In the Controls section of the Ribbon, add a Text Box to the form
- In the Property Sheet, change its characteristics as follows:
Name: txtTotalParts
Control Source: =Nz([srPartsUsed].Report!txtSubTotals)
Format: Fixed - Change the caption of the accompanying label to Total Parts:
- From the Controls section of the Ribbon, add a text box to the form
- In the Property Sheet, change its characteristics as follows:
Name: txtTotalLabor
Control Source: =Nz([srJobsPerformed].[Report]![txtCosts])
Format: Fixed - Change the caption of the accompanying label to Total Labor:
- From the Controls section of the Ribbon, add a text box to the form
- In the Property Sheet, change its characteristics as follows:
Name: txtTaxAmount
Control Source: =CLng(CCur(Nz([txtTotalParts])+Nz([txtTotalLabor]))*CDbl([TaxRate])*100)/100
Format: Fixed - Change the caption of the accompanying label to Tax Amount:
- From the Controls section of the Ribbon, add a text box to the form
- In the Property Sheet, change its characteristics as follows:
Name: txtOrderTotal
Control Source: =CCur(Nz([txtTotalParts]))+CCur(Nz([txtTotalLabor]))+CCur(Nz([txtTaxAmount]))
Format: Fixed - Change the caption of the accompanying label to Order Total:
- Format the controls to appear like the others:
- Save and close the form
- The RepairOrders form should still be opened in Design View.
In the Controls section of the Ribbon, click the Text Box control and click below the date-based controls that were previously added - Change the caption of the accompanying label to Repair Duration:
- Click the text box to select it
- In the Property Sheet, click the All tab and change following characteristics:
Name: txtRepairDuration
Control Sourcce: =DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime]) & " Minutes" - Click OK
- Format the design of the label and the text box to appear like the other controls:
- From the Controls section of the Ribbon, add 3 text boxes
- Using the Property Sheet, change their characteristics as follows:
Associated Label - Caption Text Box Name Control Source The car was in repair for: txtDays =IIf(DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime])\1440=0,"",IIf(DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime])\1440=1,DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime])\1440 & " day",DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime])\1440 & " days")) Delete txtHours =IIf((DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime])\60) Mod 24=0,"",IIf((DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime])\60) Mod 24=1,(DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime])\60) Mod 24 & " hour",(DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime])\60) Mod 24 & " hours")) Delete txtMinutes =IIf(DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime]) Mod 60=0,"",IIf(DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime]) Mod 60=1,DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime]) Mod 60 & " minute",DateDiff("n",[DropOffDateTime],[OrderCompletedDateTime]) Mod 60 & " minutes")) - Format the controls to appear like the others
- Close the report
- When asked whether you want to save, click Yes
- Open the Ceil Inn1 database from the Lesson 20
- On the Ribbon, click Create and click Report Design
- Double-click the button at the intersection of the rulers
- In the Property Sheet for the report, click the All tab and change the following properties:
Record Source: Occupancies
Width: 5 - Save the report as srOccupancies
- In the Tools section of the Ribbon, click Add Existing Fields
- In the Field List, double-click DateOccupied, RoomNumber, RateApplied, and PhoneCharge
- Complete the design of the sub-report as follows:
- Save and close the report
Printing a Report
Introduction
After creating a report, you have many ways to print it. The fastest option consists of sending the report directly to the printer. To do this:
- In the Navigation Pane, right-click the report and click Print...
- CClick File and click Print. This would display a window with three options:
To send the document directly to the printer, click Quick Print.
Automating Printing
To make it easy for users to print a report, you can add a button on a form so that the user can click that button to initiate printing. probably the best way to do this is to use the Command Button Wizard to create the button.
Practical Learning: Printing the Records
- In the Navifation Pane, right-click the RepairOrders form and click Design View
- In the Controls section of the Ribbon, click the Button and click in the Form Footer section on the left side of the Close button
- In the first page of the wizard, in the left list, click Report Operations
- In the right list, click Print Report
- Click Next
- In the second page of the wizard, make sure the RepairOrders report is selected and click Next
- Click Print Record and change it to Print all Repair Orders
- Click Next
- Change the name of the button to cmdPrintAllRecords
- Click Finish
- Right-click the title bar of the form and click Form View
- Click the Print all Repair Orders button
The Print Dialog Box
The Print dialog box is the most regular object used to send a document to the printer. To display it:
- Click File and click Print. In the window that appears, click Print
- Use the Print Preview. In the Print section of the Ribbon, click the Print button
Any of these actions would display the Print dialog box:
If a report contains many records:
- To print all of them, in the Print dialog box, accept or click the All button
- To print a specific record, click the From text box and type number of the record
- To print a range of records, click the From box, type the starting range. Click the To text box and type the end number of the range
After making the selection, click OK on the Print dialog box.
Practical Learning: Printing the Records
- In the Print dialog box, click OK
- Right-click the title bar of the form and click Design View.
Printing a Specific Record
In a transaction-based application, a user usually wants to print only the record he or she is viewing from a form. You can assist the user with a macro. When creating the macro, you have to specify the condition by which the record would be selected.
To proceed, start a normal macro:
- In the Add New Action combo box, select Open Report
- In the Action Catalog window, expand Actions and expand Database Objects. Drag OpenReport and drop in the left window
You must specify the name of the report in the Report Name combo box. To create the condition that specifies how to locate the record to print, write an expession or use the Expression Builder to create it.
Practical Learning: Printing a Record
- In the Controls section of the Ribbon, click the Button .
If the wizard comes up, click Cancel - In the Property Sheet, click the All if necessary and change the following characteristics for the button:
Name: cmdPrintRepairOrder
Caption: Print Current Repair Order
- Click On Click, then click its ellipsis button
- In the Choose Builder dialog box, make sure Macro Builder is selected and click OK
- Click the arrow of the Add New Action combo box and select OpenReport
- Click the arrow of the Report Name combo box and select RepairOrders
- Click the arrow of the View combo box and select PrintPreview
- Click the button on the other side of the Where Condition = text box
- In the middle list of the Expression Builder, double-click ="[ReceiptNumber] = " & [ReceipNumber] (this expression means "Find the record where the ReceiptNumber (on the report) is equal to the current ReceiptNumber (on this form")
- On the Ribbon, click the Close button
- When asked whether you want to save the macro, click Yes
- Select all three buttons in the Form Footer section
- On the Ribbon, click Format
- In the Control Formatting section, click Quick Styles and click Subtle Effect, Gray, Accent 3 (4th column, 4th row)
- Right-click the title bar of the form and click Form View
- Navigate to the third record
- Click the Print Current Repair Order button
- On the dialog box, click OK
- Click the Close button to close the form
- When asked whether you want to save, click Yes
- Close Microsoft Access
How To Create Report Access
Source: http://www.functionx.com/access/Lesson27.htm
Posted by: hubbardandome.blogspot.com
0 Response to "How To Create Report Access"
Post a Comment