Jan's Illustrated Computer Literacy 101 Logo:Jegsworks Jan's Illustrated Computer Literacy 101


Home > Jan's CompLit 101 > Working with Databases > Forms & Reports > Forms > Printable Form
Icon: Arrow - Previous pagePrevious    NextIcon: Arrow - Next page

Jan's Working with Databases

   Forms & Reports: Forms: Printable Form

What works well on the screen may not fit onto paper for printing.

Most forms are not designed for printing. You should be aware of how they will print anyway! You never know when someone might want to print.

Small problems with print layout can often be fixed in the Page Setup dialog by changing the margins or switching to Landscape orientation. Unlike with a table or query, your Page Setup choices are saved with the form. You only have to get that part right once!

Bigger problems may require you to rearrange the controls on the form itself or to make changes to properties.

Common issues with printing forms:

  • Form Width/Height:
    A record runs over onto a second sheet with little or no data on it.
      Solution: Adjust margins or resize controls and form to fit on paper.
  • Background for Form and Controls:
    Printing the background uses a lot of ink and makes the form slow to print.
      Solution: Don't use a background or create a form just for printing that does not have a background.
  • Border for Controls:
    Border around controls can make the print-out hard to read.
     Solution: Make borders transparent.
  • Black and white printing:
    Form is hard to read when printed with just black ink.
      Solution: Make sure there is enough contrast between text and background colors to make black-and-white or gray scale print readable. Or, omit the background.
  • Data hidden:
    By default, a printed form shows only what you can see on the screen. If a control has more content than shows, that hidden content won't print.
      Solution: Set the Can Grow property for the control and for the Detail section to Yes.
  • Page and Form Headers and Footers:
    Confusion over which prints where. (See next section)

Page Header/Footer vs. Form Header/Footer in Printing

It is rather confusing how headers and footers print with a form. It depends on which ones they are! You might expect to see the page header and footer within the top and bottom margins, like they are in Word and Excel. Not so!

In the example below, the Page Header was designed to show the current date, at the right, like "Printed on 3/10/2016". The Page Footer was designed to show the page number and the total number of pages, like "Page 2 of 77". The Form Header contains the header that you see in Form View. The Form Footer has the same background color as the Form Header but has no controls. (I put it there just so to have something that would show for this example).

Form Print Preview: page 1 showing form header, page header, page footer

First, second, and last pages of printed form records

Margins set in Page Setup will not have anything printed in them at all. This is NOT like Word or Excel, for example.

The form header prints on the first page only above everything else.

The form footer prints on the last page only, directly below the last record, which may not be at the bottom of the page.

The page header will print on each page above the record(s). On the first page it shows below the form header.

The page footer prints on each page at the bottom of the page.

Unexpectedly, you cannot configure a page header or footer for a printed form from the Page Setup Dialog. You must be in the Form Design View. You can show the Page Header/Footer by right clicking a section bar or the Detail background and choosing Page Header/Footer from the context menu. Then you can add controls to it or format its background.


Icon: Step-by-Step 

Step-by-Step: Printable Form

 Icon: Step-by-Step

What you will learn: to change Page Setup for printing the form
to resize form to fit on page
to change Back Color
to change Alternate Back Color
to change control borders and Special Effect
to use the CanGrow property

Start with:  Class disk, resource files, worldtravel-Lastname-Firstname.accdb from folder databases project4 as updated in the previous lesson

You are going to create a form just for printing. We will take the easy way and make it very similar to the screen version.

Print Preview and Page Setup

  1. Print PreviewOpen the form Projects Form-background.
  2. Open Print Preview.
    Print Preview is not in the list of views for forms.
    Method 1: File > Print > Print Preview
    Method 2: Click the Print Preview icon Quick Access Toolbar: Print Preview Quick Access Toolbar: Print Preview (Access 2016) on the Quick Access Toolbar. This button is not present by default. But it is on the drop list of popular commands.

    The preview looks pretty good on page 1. But... the controls are cutoff just a bit, which creates a weird and wasteful second page.

  3. On the Print Preview ribbon tab, click the Page Setup button Button: Page Setup (Access 2010).
    The Page Setup dialog appears.

    Dialog: Page Setup - default margins The default margins are 0.25", which is as small as most printers can get to the edges of the paper. So changing the margins is not going to help this time.

    You will have to adjust the width of the form itself to fix the wasteful page.  

  4. Click on OK, to close the dialog.  
  5. Close Print Preview.

Resize Form to Fit Page

  1. Design View: Form too wide to print on one page (Access 2010)Icon: Design View Switch to Design View.
    The ruler shows that the form has a width of more than 8". You used the Form button to create this form originally.

    The margins are 0.25" left and right for a total of ½". Letter size paper is 8½" wide. That leaves only 8" for the width of what you are printing.

    Happily, the controls on this form are far wider than necessary.  

  2. Select the data controls.
  3. Drag the right edge of the selected controls to the 7.75" mark.
  4. Select the blue line in the header and set its Width property the 7.75".
    If you try to drag the line smaller, it is very easy to make the line slant.

    Icon: Trouble Problem: Cannot select the line
    Solution:
    Drag from just above the line down until the orange selection border shows.
    If you accidentally select more than just the line, hold the CTRL key down and click on the parts you do not want to deselect them.

  5. Drag the right edge of the form to the 8" mark.

    Icon: Trouble Problem: Cannot drag form edge to the left
    You have a control in the way, probably the line in the Form Header.
    Solution: Make sure ALL controls are narrower the desired form width.

  6. Icon: Print Preview Switch to Print Preview.

    Print Preview: Projects Form - Print: Takes two pages to print all records (Access 2010)

    It takes two pages to print all eight records. There are no more pages with just a slice of the form. That's an improvement!

    Notice how the background alternates between records. That helps the user see where a record starts and stops, but it uses a lot of ink.

    Also notice that the transparent background of the logo image is letting through the background color instead of the tiled background image. Unexpected, and not like Form View at all!


Change Back Color

The backgrounds are very nice for Form View but not so much for printing. It is very useful to create a form especially for printing. Such a form should not have a background image. It is usually better to not even use a background color for the sections.

  1. Icon: Design View Switch to Form Design View.
  2. Button: Save (Access 2010) Save the form as Projects Form - Print.
    Now you can fix the background.

  3. Property Sheet: drop list of form partsIf necessary, open the the Property Sheet.
    The dialog shows the properties for whatever is selected.

  4. Open the drop list at the top of the dialog.
    It lists every control and every section of the form in alphabetical order.

  5. Scroll the list and see just how many choices there are.

  6. Property Sheet: Projects Form: Picture property (Access 2010)Click on Form in the list.
    The Property Sheet now shows the properties available for the Form as a whole.

  7. Scroll the list and see what you can change about the form.
    The Picture property shows wall.bmp. This is the image that is the form's background. Note the other Picture properties.
     

  8. Message: Do you want to remove this picture from the form?Delete the file name for the Picture property and press Enter or click on a different property.

    TipOnly after the focus leaves the property does Access apply your change.

    A message appears that asks if you really want to remove the picture.
    Of course you do.

  9. Form Design View: Projects Form-Print with no background image (Access 2010)Click on Yes.

    The image background vanishes. The original background color is still there.

    Back to the Property Sheet! The background color must be changed for each section: Form Header, Detail, Form Footer.

  10. Click on the selection bar for the Form Header section.

    The Property Sheet changes to show properties for this section.

  11. Color Palette - Automatic (Access 2010)Click the property Back Color.
    The value showing is for the section's current background color.
    The Ellipsis button Button: Ellipsis appears, which tells you that there is a dialog available.
  12. Click the Ellipsis button.
    The color dialog appears.

  13. Click on Automatic and then on OK.
    The Color dialog closes, but nothing else changes yet.  

  14. Click on another property in the list.
    The background of the Form Header section changes to white, which is the default background color for the form.

    Design View: Projects Form-Print: whilte background for Form Header (Access 2010)

  15. Check the Back Color for the Detail and Form Footer sections.
    They should both have the default background color already.


Change Alternate Back Color

There is an extra property for the Detail section - Alternate Back Color.
This second color is used for background color for alternating records. This helps the user see where records change in Continuous Forms and in print-outs, but it uses a lot of ink. When you take out this color, you need to add something to help separate the records. A dividing line is an easy way to do time.

  1. Print Preview: section backgrounds white but records alternate colors (Access 2010)Icon: Print Preview Switch to Print Preview.
    The records still alternate background color - White (Back Color) and Gray (Alternate Back Color).
  2. Icon: Design View Switch to Design View.
  3. Select the Detail section so that its properties show in the Property Sheet.
  4. Change the Alternate Back Color to the same value that shows for Back Color.

    Next you need to add a line to separate records now that the background colors won't do that job.

  5. Header line selected (Access 2010)Select the horizontal line at the bottom of the Form Header.
    There are multiple methods: Click on the line, drag to create a selection box that touches the line, change the drop list in the Property Sheet to the line's name, like Line21. This form currently has only one line.
  6. Icon: Keyboard Use the key combo CTRL + X to cut the selected control
  7. Click on the background of the Detail section.
  8. Detail line selected (Access 2010)Icon: Keyboard Use the key combo CTRL + V to paste the line.
    It appears directly below the Detail selection bar.
    The orange border and handles make it fairly easy to see right now.
  9. Detail line selected (Access 2010)Detail line NOT selected (Access 2010)Click on the background of the Detail section and find the line.

  10. Click on the Form Header to get the selection off the Detail section.

    Can you see the line now?

    The illustrations show the line when the Detail section is selected and when it is not. In either case, the line is so close to the selection bar that it is hard to see in Design View.

  11. Print Preview: Projects Form-Print with all white backgrounds (Access 2010) Icon: Print Preview Switch to Print Preview.

    Hmmm. This will print a lot faster and will use a lot less ink, but those boxes around the field values make this hard to read.  The logo in the Form Header is showing some odd lines in some versions. More to fix!

Change Control Border and Special Effect

You will now remove the borders around the text boxes. Those are important when you are entering data but they are in the way for printing. The logo needs to lose those extra lines. They are coming from the Special Effect.

  1. Icon: Design View Switch back to Form Design View.  

  2. Form Design:Select data controls (Access 2010)

    Select all of the data controls in the Detail section.
    The Property Sheet changes to "Multiple Selection".

    The properties will be blank except where all selected controls have the same value for the property.

  3. Change the Border Style property to Transparent.

  4. Select the logo image in the Form Header.

  5. If necessary, change the property Special Effect to Flat.

  6. Print Preview: Projects Form - Print with transparent control borders (Access 2010)Icon: Print Preview Switch to Print Preview.
    Much easier to read. Logo looks better, too.

    The controls are so wide that they are definitely wasting space.

    Multiple columns might be nice. We will look at how to do that in a later lesson.

  7. Button: Save (Access 2010) Save the form.
    [Projects Form-Print]
     


Can Grow Property

In a printed form you want to be SURE that all of the data actually prints. If the control is not large enough, your data is just cut off UNLESS you take advantage of the Can Grow property.

Thinking: Which controls on this form cut data off now? Which are most likely to cutoff the data in the future?
Answer: The Memo/Long Text type controls, like Project Description.

  1. Property Sheet: Project Description: property Can Grow = Yes (Access 2010)Icon: Design View Switch to Form Design View.

  2. Select the control Project Description.

  3. Click in the box for Can Grow.  

  4. Change the value to Yes.  

  5. Click out to apply your changes.  

  6. Select the Details section and verify that its own Can Grow property is Yes.
    If not, change it.
  7. Icon: Form View Switch to Form View and navigate to the last record.
  8. Icon: Keyboard Use the key combo SHIFT + ENTER to create a line break at the end of the existing text in the control Project Description.
  9. Revise the data in the control to include the additional text below:

    Revise and improve site.
    Add pages for the special trip offers.
    Add ability to share the site with Facebook, Twitter, etc.
    Add a map of our locations.
    Revise pages to use current HTML and CSS standards.

    As you type, the text will scroll inside the control. There are too many lines of text to fit in the space allowed.

  10. Control grew taller on print-out to show data that would not fit in Form View (Access 2010)Icon: Print Preview Switch to Print Preview and look at the last record.
    The control grew to hold all of the data. Super!
     
    TipZoom: You can enlarge the view with the Zoom button or the Zoom drop list at the bottom right of the Status Bar.
  11. While in Print Preview, view all of the pages.
    Do all pages look right? (In Access 2007 the last record is higher on the page than in the illustration.)

    When you allow controls to grow as needed, the form may have to enlarge to hold the new sizes. That can be an unpleasant surprise at print-out! In this case, the records still (barely) fit onto two sheets of paper.

  12. Button: Save (Access 2010) Save the form.
    [Projects Form-Print]


Page Setup for Printing

If you are doing these lessons for a class, your instructor may want a printed copy of this form. You need to add your name to the Page Header.

  1. Icon: Design View Switch to Form Design View.
  2. Right click on a background area and choose Page Header/Footer.
    Two new sections appear.
  3. Page Header: label with name (Access 2010)In the Page Header, add a new Label control Button: Label (Access 2010) at the far right .
  4. Type your name in the label.
  5. Page Footer: control with date (Access 2010)In the Page Footer, add a new unbound Text Box Button: Text Box (Access 2010) control at the far right.
  6. Type in the text box =Date().
    This expression causes the control to show the current date in Form View.
  7. Delete the label for this control.
  8. Adding a control to the Page Header and to the Page Footer increases the number of pages (Access 2010) Button: Save (Access 2010) Save the form.
    [Projects Form-Print]

  9. Icon: Print Preview Switch to Print Preview.
    Icon: Access 2010 Access 2010: Adding a Page Header and Page Footer increased the number of pages to 3.

    The label with your name does not show a border, by default. The date in the Page Footer is in a text box and does show a border by default.

  10. Icon: Print Print all pages.

    Does the border around the date show on the printed pages? It is a pale gray that may be hard to see in print.

    This is another example of how WYSIWYG (What You See Is What You Get) print previews may not quite match what your printer produces!