Preview button

A

Andrea

I have a button on a form that when clicked, will run a
parameter query that will ask the user for the ID number
of the form (underlying table)and then it will generate a
report for that ID. Is there a way that I can create a
button that when clicked, it will send the user to print
preview for the current ID being viewed?
 
J

Jeff Boyce

Andrea

Check Access HELP on the following command syntax:

DoCmd.OpenReport ,,,

there are values you can use to open in Preview, and a "Where" clause you
can use to pass the value of the form's current ID to the report being
opened.

NOTE: if it is your REPORT that calls the parameterized query that asks for
ID, you'll need a new report that is based on all records. This is what
you'll be passing the ID to.
 

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