Access Subreport objects from vba code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roger

    #1

    Access Subreport objects from vba code

    How can I access subreport objects from vba? Sample code would be
    appreciated.

  • Larry Linson

    #2
    Re: Access Subreport objects from vba code

    "Roger" wrote
    [color=blue]
    > How can I access subreport objects from vba?
    > Sample code would be appreciated.[/color]

    Forms embedded in Subform Controls and Reports embedded in Subreport
    Controls are not "open" and will not be found in the Forms and Reports
    collections, respectively. They exist as the Form or Report property of the
    Subform or Subreport Control, respectively, in which they are embedded.

    If the code is in the module of the Report embedded in the Subreport
    Control, using the "Me" shortcut is the simplest way. If the code is in the
    module of the Report in which the Subreport control is embedded, then

    Me!NameOfSubrep ortControl.Repo rt!NameOfContro l

    If the code is outside the Report hierarchy, as in a standard module:

    Reports!YourRep t!SubreportCtlN ame.Report!Cont rolName


    Comment

    • Roger

      #3
      Re: Access Subreport objects from vba code

      Thanks

      Comment

      Working...