ACC: Printing on Avery 5267 Labels

Last reviewed: May 28, 1997
Article ID: Q103171
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you print Avery 5267 labels, the text may appear to creep down the page.

CAUSE

Avery 5267 labels are not cut in precise .5-inch increments on the page. Because the labels are slightly larger than .5 inch, if you print in .5- inch increments, the text appears to creep down the page.

RESOLUTION

When you place the controls in a report, allow room for the label discrepancy. The following steps print three lines of text on Avery 5267 labels. This example uses a function that concatenates the fields for optimal use of space on each label.

  1. Create a new report using the Label Wizard (or Mailing Label Wizard in version 2.0)

  2. Add only one field to your label.

  3. Open the label in design view.

  4. In Microsoft Access 7.0 and 97:

    On the File menu click Page Setup, set the top and bottom margins to .5 inch and set the left and right margins to .25 inch. Click the Layout tab and set Items Across to 4, Row Spacing to 0, and Column Spacing to 0.3 inches. Under Item Size, select the Same As Detail option.

    In Microsoft Access 1.x and 2.0:

    On the File menu click Print Setup, set the top and bottom margins to .5 inch and set the left and right margins to .25 inch. Click More and set Items Across to 4, Row Spacing to 0, and Column Spacing to 0.3 inches. Under Item Size, select the Same As Detail option.

  5. Make the width of the report 1.75 inches.

  6. Set the Height property for the Detail section to .5 inch and set the CanGrow and CanShrink properties to No.

  7. Locate the text box control and manually set the properties as follows:

          Control: Text Box
    
             Top: .01
             Height: .48
             CanGrow: Yes
             CanShrink: Yes
             Font: Arial
             FontSize: 8
             ControlSource:
              =AddressBlock([First],[Last],[Address],[City],[State],[Zip])
    
       NOTE: In the ControlSource property use your field names, not [first],
       [last], and so on. Also the number of arguments used in the
       ControlSource property must match the number of arguments in
       the AddressBlock function.
    
    

  8. Create a new module, and type the following code:

    NOTE: In the following sample code, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this code in Access Basic.

          Option Explicit
    

          Function AddressBlock$ (First, Last, Address, City, State, Zip)
    
             Dim A1$, A2$, A3$, CR$
    
             CR$ = Chr(13) & Chr(10)  'Carriage return and line feed
             A1$ = IIf(ISB(First),"",First & " " & IIf(ISB(Last),"" ,Last _
             & CR$))
             A2$ = IIf(ISB(Address),"",Address & CR$)
             A3$ = City & ", " & State & " " & Zip
             AddressBlock = A1$ & A2$ & A3$    'Concatenate the strings.
          End Function
    
          Function ISB (V) As Integer
             If IsNull(V) or V = "" Then ISB = True Else ISB = False
          End Function
    
    
The spacing above creates a .01 reserve above and below the text control. Variations of this layout may also print correctly.

NOTE: The Mailing Label Report Wizard creates two controls, each with a height of .17, leaving a reserve below and above the text for label adjustments.


Keywords : kbusage RptLabel
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.