Hi John,
The report you are opening using the OpenReport macro command must be bound to a query that requires a parameter. To create a parameter in a query, enter it in the criteria section as well as explicitly in the Parameters dialog box. E.g. Enter [Enter ID] in the criteria column of whatever the primary key field is. Click the Parameters button within the Query Tools tab, enter [Enter ID] and select data type as Long Integer.
Ensure the form or report has this query as its Record Source. Now when you create the macro using the OpenReport or OpenForm commands you can click the Update Parameters hyperlink at the bottom right of the command's form. This will add a Parameters section to the command's form requesting the value or expression for the paramater [Enter ID].
HTH.
Malc.
|