Report Printing

F

Farkyss

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?
 
D

Daryl S

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.
 
F

Farkyss

Bang on. Thanks for that

Daryl S said:
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 said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top