ACC: Limitations on Setting Report Properties at Run Time

Last reviewed: April 2, 1997
Article ID: Q114510
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0

SUMMARY

Novice: Requires knowledge of the user interface on single-user computers.

Microsoft Access versions 1.x and 2.0 support using macros or code to set certain properties at run time for reports.

MORE INFORMATION

To prevent possible problems during formatting and printing, the following limitations have been imposed for setting properties at run time for reports:

  • The following properties can only be set from the OnOpen property (not from OnFormat, OnPrint, or OnRetreat):

        - "Datasource" properties: RecordSource, ControlSource,
          LinkChildFields, and LinkMasterFields.
    

        - The RecordSource property of a SubReport/SubForm embedded in a
          report can only be set from the OnOpen of the SubReport/SubForm.
          This property is Read Only from the OnOpen of the Main Report.
    

        - Any action in any property that would cause the report width to grow.
          This includes moving a control past the current report width. This is
          restricted because you could inadvertently increment the number of
          pages in the middle of a print job.
    
  • The following properties cannot be set at run time at all:

        - The SourceObject property for subforms and subreports.
    

        - "Event" properties: OnOpen, OnFormat, OnPrint, and so on.
    

        - RunningSum
    

        - HideDuplicates
    

        - CanGrow and CanShrink
    

        - KeepTogether
    

        - ForceNewPage
    

        - RowSource for Graph objects
    

        - Height property of the section
    
  • The following properties can be set from the OnFormat property, but not the OnPrint property:

         - The Height property of a control
    

         - The Width property of a control
    

All other properties can be set at run time (in a report's OnOpen, OnFormat, or OnPrint property, for example).

NOTE: All the restrictions in this article also apply to form printing.

REFERENCES

For more information about designing reports, search for "setting properties," and then "Setting Properties Using Code, or search for "report properties" using the Microsoft Access Help menu.


Keywords : kbusage RptProp
Version : 1.0 1.1 2.0
Platform : WINDOWS
Hardware : X86
Issue type : kbinfo


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: April 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.