ACC: Limitations on Setting Report Properties at Run Time

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
Issue type : kbinfo


Last Reviewed: April 3, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.