"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:
Comment