Access Basics:
Print Objects

Title: Jan's Illustrated Computer Literacy 101
Did you want: Working with Databases: Access 2007, 2010, 2013, 2016


Producing a useful, readable print-out takes some planning. The Page Setup dialog, the Properties dialog, and the Print dialog are your tools for getting just what you want to see on those pages.

Dialog: Page Setup - Margins Dialog: Properties for Diary control Dialog: Print

Dialogs: Page Setup, Properties, Print


Where you are:
JegsWorks > Lessons > Databases

Before you start...

Project 1: Intro

Project 2: Access Basics Arrow: subtopic open
    InterfaceTo subtopics
    Getting StartedTo subtopics  
    Access Objects Arrow: subtopic open
    Icon: StepTable: Design View
    Icon: StepTable: Datasheet View
    Icon: StepManage a Table
    Icon: StepSort & Filter a Table
    Icon: StepQuery Wizard
    Icon: StepAutoForm
    Icon: StepAutoReport
    Icon: StepData Access Page
        About Printing
    Icon: StepPrint Objects
    RelationshipsTo subtopics
    Summary
    Quiz
    ExercisesTo subtopics

Project 3: Tables & Queries

Project 4: Forms & Reports


Search  
Glossary
  
Appendix



Icon Step-by-Step 

Step-by-Step: Print Access Objects

 Icon Step-by-Step

What you will learn:

to change page margins
to change orientation of paper
to print all records in a datasheet
to select multiple records in a datasheet and print
to change properties for a form
to add a page header and footer
to hide the page header
to print a form
to print a report
to print a data access page


Start with: mytrips.mdb from previous lesson

Learning to use Print Preview, the Print dialog instead of the button, and the Page Setup dialog will help you save a lot of wasted paper. Look before you print!

Datasheet: Print Preview, Page Setup Dialog, Print Button

  1. Database WindowIf necessary, switch to the Database Window.
     

  2. Open the table Trips.
     

  3. Click the Button: Print Preview (2003) Print Preview button.
     The preview shows that in portrait orientation it will take 2 pages to print the table.

    Print Preview: Trips table, page 1 Print Preview: Trips table, page 2

    The page header shows the table name in the center and the date at the right.
    The page footer shows the page number in the center.
    You cannot change these choices other than to turn them off in the Page Setup dialog. (Uncheck box for Print Headings.)
    TipThe Page Setup dialog is also available from the File menu in most views.
     

  4. Dialog: Page Setup -Left and Right  Margins changed to half inchClick the button Setup... Button: Setup. The Page Setup dialog appears.
     
  5. Change the Left and Right margins to 0.5 inches and click on OK. Leave Print Headings checked.
    You return to the preview. It still will take two pages.
     
  6. Dialog: Page Setup - Page tab - Orientation changed to LandscapeClick Setup... again and click on the Page tab.
     
  7. Change the orientation to Landscape. Click on OK.

    Now you have just one page in the preview.
    How do you know?? Look at the navigation buttons. The Next and Last buttons are grayed out. Just one page now!

    Print Preview: Table Trips in landscape orientation

  8. Icon: Print Click Button: Print (2003) the Print button on the toolbar.
    You may briefly see a dialog flicker by. This dialog reports the progress of the formatting of the document for printing. It goes out of sight quickly for such a short and simple document.
     
    Note how long it takes to print this page in landscape orientation. Is it slower than normal?

    WarningThe Print button starts printing right away. You will have no choices of what to print or how. Be sure you know what is going to happen!
     
  9. Inspect your print-out. Which columns are too narrow to show all of the data?
     
    You could improve this print-out by adjusting the column widths. However, you cannot get all of the memo fields (Description, TravelAgent, and Diary) to show all of their text without wasting a lot of paper. So we will experiment shortly.
     

Datasheet: Select Multiple Records, Print Selected Records using Print dialog

  1. Rows selectedClick on the record selector at the left of the Alaska trip, record #2, and drag down to record #5,  Hilton Head. Four records are selected.
     
  2. Dialog: Print - Selected recordsFrom the File menu select  Print... 
    The Print dialog opens.
    (Remember: If you click the Print button, the printer starts right up and prints all records!)
     
  3. Select to print Selected Records by clicking its radio button.
     
    There is no Print Preview button in this dialog. You can open the Page Setup again, which is actually a good idea.
     
  4. Dialog: Page SetupClick the the Setup... button.
    The Page Setup dialog appears, but it only has one tab and the margin sizes are reversed from what you did a minute ago!
    Why??
    You set the margins in Portrait orientation and then switched to Landscape. The "top" of the page is a different edge now. The dialog values are right but the Sample image is wrong!
     
  5. Icon: PrintPrinted page for selected recordsClick on OK to close the Page Setup dialog and then on OK again to start printing.
    Your page should be in landscape orientation with just 4 records showing.
     
  6. Experiment:
    Switch to Table Design View and experiment with different column widths and row heights. What does it take to get all of the memo fields to show all of their text? (Hint: the Diary field for the Ireland trip has the most text.)
     
    You will probably find that only one record will fit on a page and there will be lots of empty space. There are better ways to get a printed copy of these records that shows all of the text!
     
  7. Close the table without saving your changes.

Form: Print Preview, Behavior Properties

The Properties dialog often has choices that affect the way the form or report behaves. Other properties affect only the look.

Can Grow and Can Shrink Properties for text boxes: 
By setting these properties to Yes for the controls for memo fields, the controls will expand and contract to fit the amount of text.

Keep Together Property for Detail section:
By setting this property to Yes, all of a record's controls will print together and will not be split between two pages. However, if the form is too wide for the paper, a second page will print before the next record is printed.

  1. Print Preview, page 1If necessary, switch to the Database Window.
     
  2. Click on Forms in the Object list and then open the Trips AutoForm.
     
  3. Click on Button: Print Preview (2003) the Print Preview button.
     
  4. Use the navigation bar to view each page and inspect the records. Look at the memo fields in particular.
     
    The first page holds 2 complete records and part of a another. The third record is split between this page and the next one. The Diary field is cut short.  The header and footer are blank. The background color will print. These are all bad for printing.
     
    Happily, you can make changes that will help.
     
  5. Switch to Form Design View.
     
  6. Form Design View: Select memo fieldsIf necessary, open the Properties dialog by clicking Button: Properties the Properties button on the toolbar.
    Icon: TroubleProblem: Properties dialog vanished
    You clicked the Properties button when the dialog was already open, and therefore closed it. 
    Solution:
    Click the button again and it will reappear.
     
  7. Click on the control Description, which is a memo field.
     
  8. Hold the SHIFT key down and click on the TravelAgent and Diary controls.
    All three are selected at the same time.
     
  9. Dialog: Properties - multiple slection - Can Grow, Can ShrinkIn the Properties dialog, click on the Format tab and change the Can Grow and Can Shrink properties to Yes.
     
    (The All tab lists all of the properties on the other tabs.)
     
  10. Click Detail bar to select whole Detail sectionClick on the Detail bar to select the Detail section (the part that has the form's controls in it).
    The Properties dialog changes.
     
  11. Dialog: Properties -Detail - Keep togetherChange the Keep Together property to Yes.
     
  12. Switch to Form View and navigate through the records. No changes! Why not??
     
    These particular changes will apply to the printed version of the form.
     
  13. Print Preview: after setting Can Grow and Can Shrink to Yes - page 1Switch to Print Preview.
     
  14. Navigate through the pages. Do you see changes now??
    • The first page no longer has part of record #3.
    • The memo controls are shrinking and expanding to fit the text.
    • No records are split between pages.

    Hurrah!

    Notice that there is nothing in the header or footer of the page. The AutoForm wizard does not put anything there, but you could.
     


Form: Page Header/Footer

The AutoForm wizard did not include a header or footer for this form. A form can have a form header and footer as well as a page header and footer. A form header or footer will appear with each form. A page header or footer will appear only on each page. The difference matters when you have more than one form on a page.

You will create a footer that shows the page number.

  1. Switch to Form Design View.
     
  2. Form Design View: Page Header and FooterFrom the View menu, select  Page Header/Footer .
    Two new sections appear in the Form Design View.
     
  3. Click on the Page Footer. The Page Footer section bar turns to black to show that the section is currently selected.
     
  4. Dialog: Page NumbersFrom the menu select  Insert  |  Page Numbers... . The Page Numbers dialog appears. 
     
  5. Select
       Page N of M
       Bottom of Page [Footer]
       Alignment = Center.
     
  6. Click on OK. A text box appears with some code in it.
    In Design View you see the formula that creates what will show on the page in Print Preview. It can be quite hard to read in Design View!
    Page footer with Page N of M style numbering
     For this form, you won't put anything in the page header.
     
  7. Resize VerticalMove the mouse pointer over the upper edge of the Details bar until it turns in to the Vertical Resize shapePointer: Resize row.
     
  8. Drag up and drop at the top of the Page Header section. There should be no gap between the two section bars.
     
  9. Print Preview- footer with gray backgroundSwitch to Print Preview to see your changes.
    The footer shows with a gray background like the Detail section. There is a big white gap between the bottom of the form and the top of the footer.
     
    Perhaps it would be better to remove the background color for printing.
     

Form: Back Color

Some of the choices in the Properties dialog affect the look of the object. The font, font size, font color, background color, and style of the control are all changeable.

To improve the way the form prints, you will change the background colors and then save the form with a new name.

  1. Switch back to Design View.
     
  2. Dialog: Properties - page footer -back colorClick in the Page Footer to select it. The Properties dialog should have PageFooterSection in the title bar.
     
  3. In the Properties dialog, click in the value for Back Color. A button appears at the right with three dots Button: 3 dots.
     
  4. Click on Button: 3 dots the three dots. The Color dialog appears.
     
  5. Dialog: Color - whiteClick on the white square, at the lower right. Then click OK.
     
  6. Print Preview - background whiteClick a different property in the Property dialog. Your change is applied only after you leave the text box. The footer background color is now white.
     
  7. Repeat for the Detail section.
     
  8. Switch to Print Preview. Inspect all 4 pages.
     
  9. Icon: Print Click Button: Print (2003) the Print button button to print all four pages.
     
  10. On the File menu select  Save As . The Save As dialog appears with the current name in the text box.
     
  11. Dialog: Save AsEdit the name to read Trips AutoForm - Print.
     
  12. Click OK.
    You now have a form to use when you want to print instead of view it on a screen.
     
  13. Close the Print Preview and then close the Design View.

Report: Print

You can make the same type of changes to reports as you just did for forms. The Properties dialog is full of choices! For now, you will just print the report that you created. In later lessons you will learn to make more changes.

  1. Switch to the Database Window and select Reports.
     
  2. Right click on Trips AutoReport. A menu appears that includes the command Print. You don't want to click that at this time. You should always look at the print preview before you print! This will save you many wasted pages.
     
  3. From the popup menu select  Print Preview .
     
  4. Button: Multiple Pages - palette 2x3Click on the button Multiple Pages Button: Multiple pages on the toolbar and drag the palette to select 2 x 3 Pages. All 5 pages show at once. They may be too small to read on your screen but you can see how the records are laid out on each page. The last two records are too long to fit on the same page.
     
  5. Print Preview of multiple pages with Can Grow/Can Shrink set to YesInspect all pages. Are the memo fields showing all of their text? They should be. You changed the Can Grow/Can Shrink Properties already. How handy!
     
  6. Icon: Print Click the Print button to print all of the records.
     
  7. Close the Print Preview window.

Data Access Pages: Print

A data access page is used to view database records in a browser. While you can print from inside Access, that is not what your users will be doing.

  1. Open a new browser window.
    If you do not create a new window, the page you are reading now will be replaced with the data access page.
     
  2. In the Database Window, select Pages and right click on Trips Page.
     
  3.  From the popup menu, select  Web Page Preview . The data access page should open in the new browser window and display the first record.
    Icon: TroubleOnly the title displays:
    Cause
    : Security settings in your browser.

    Browser showing options for bar indicating actions are blockedSolution: In IE6, look for a bar above the web page that says something like: To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer...
    Click on the bar itself. A menu appears. Select Allow Blocked Content. A confirmation dialog appears. Click on Yes.
     
  4. Print Preview of data access page in browserFrom the browser's menu select  File | Print Preview .
    There is only one page. Each record shows on a separate data access page. You can print them only one at a time.
     
  5. Print the page.
    To change to a new record, you must go back to the browser. You cannot use the navigation bar that is on the page while in Print Preview.
     
  6. Close the print preview.
     
  7. Back in the browser, display record #5 and print it.
     
  8. Close the browser window.
     
  9. Close the Trips Page window in Access.

LessonsWorking with Databases Previous Page Next Page




Teachers: Request permission to use this site with your class
 
Copyright © 1997-2012 Jan Smith   <jegs1@jegsworks.com>
All Rights Reserved

Icon: DonwloadIcon: CDWant a local copy with no ads? - Download/CD

Want to help?


~~  1 Cor. 10:31 ...whatever you do, do it all for the glory of God.  ~~


Last updated: 30 Apr 2012