From: Farkyss on
I have a FORM. On this form is a BUTTON. This button should be opening an
REPORT and PRINTING it.

The REPORT is based on information pulled together in a QUERY. The query
asks for a Sales Number in a dialog box.

The FORM in question also has a Sales Number field. I need for the BUTTON to
open and print the REPORT based on the contents of the Sales Number field
rather than asking for it in a dialog box.

All attempts I have made to achieve this have failed. Any ideas?
From: Daryl S on
Farkyss -

In your query, instead of just having [Sales Number], you should have
something like Forms![YourFormName]![Sales Number]. The form must be open
for this to work.

In query design you can use the expression builder to get the syntax
correct. Use the forms column on the left to go to the form and then
double-click on the name of the control on that form that contains the Sales
Number.

--
Daryl S


"Farkyss" wrote:

> I have a FORM. On this form is a BUTTON. This button should be opening an
> REPORT and PRINTING it.
>
> The REPORT is based on information pulled together in a QUERY. The query
> asks for a Sales Number in a dialog box.
>
> The FORM in question also has a Sales Number field. I need for the BUTTON to
> open and print the REPORT based on the contents of the Sales Number field
> rather than asking for it in a dialog box.
>
> All attempts I have made to achieve this have failed. Any ideas?
From: Farkyss on
Bang on. Thanks for that

"Daryl S" wrote:

> Farkyss -
>
> In your query, instead of just having [Sales Number], you should have
> something like Forms![YourFormName]![Sales Number]. The form must be open
> for this to work.
>
> In query design you can use the expression builder to get the syntax
> correct. Use the forms column on the left to go to the form and then
> double-click on the name of the control on that form that contains the Sales
> Number.
>
> --
> Daryl S
>
>
> "Farkyss" wrote:
>
> > I have a FORM. On this form is a BUTTON. This button should be opening an
> > REPORT and PRINTING it.
> >
> > The REPORT is based on information pulled together in a QUERY. The query
> > asks for a Sales Number in a dialog box.
> >
> > The FORM in question also has a Sales Number field. I need for the BUTTON to
> > open and print the REPORT based on the contents of the Sales Number field
> > rather than asking for it in a dialog box.
> >
> > All attempts I have made to achieve this have failed. Any ideas?