On Thu, 4 Mar 2010 12:39:01 -0800, Aaron <(E-Mail Removed)>
wrote:
>Hi:
>
>I have a command button on a form that triggers a print job of a report that
>references a query with a parameter.
>
>I'd like to set that parameter (named [entryid]) off of the id field of the
>record that I am viewing on the form.
>
>Thanks in advance,
>Aaron
Cut out the middleman: change the criterion from [entryid] to
[Forms]![yourformname]![entryid]
using the name of your form and the control on the form containing that ID.
Alternatively, you can use the WhereCondition argument in the OpenForm method
- see the vba help for the Openform Method for details.
--
John W. Vinson [MVP]
|