DoCmd.OpenReport

Open a report.

Syntax
      DoCmd.OpenReport(ReportName, View, FilterName, WhereCondition,
                       WindowMode, OpenArgs)


Key
   ReportName     The name of the report to open.

   View           An AcView constant that specifies the view
                  in which the report will open. Default=acViewNormal

   FilterName     The name of a query saved in the current database.

   WhereCondition An SQL WHERE clause (without the word WHERE.)

   WindowMode     An AcWindowMode constant that specifies the
                  window mode in which the report opens.
                  default = acWindowNormal.

   OpenArgs       A string expression that is used to set the report’s
                  OpenArgs property. This may then be used by code
                  in a report module.

Use OpenReport to open a report in Design view or Print Preview, or to print the report immediately.

Examples

'Open rptTravel
DoCmd.OpenReport "rptTravel", acViewNormal

“I get all the news I need from the weather report” ~ Paul Simon

Related:

OpenForm - Open a form.
SetParameter - Set a parameter before opening a Form or Report.


© Copyright SS64.com 1999-2013
Some rights reserved