How do I do a Print Preview of the "Current / Active" page on a fo

G

Guest

Hello all

I have attached a command button to a form and when I press the button it
brings up a print preview of the report attached to the form. The problem is
that it always shows Page 1 of the report as the default page. I can then
only navigate to theother pages in the report by clicking the page arrow at
the bottom of the report. How do I code the button so that when I click the
button it shows a preview of the "current" record rather than always showing
the first page of the report as the default page? I want to use this so that
once people have completed filling information on a form they can click the
button and immediatly get a print preview of the information they have
entered.

I would appreciate any suggestions.

Thanks

Marc
 
G

Guest

Hello again Allen / anyone else

I posted the code that Allen game me, but I am still having 2 problems:
1) When the input box comes up asking for the number of the report to print,
if you press the cancel button, a message comes up saying "run time error".
Not sure how to fix this.

2) Allen's code prints the current record using an input box where you need
to specify the page of the report that you would like to print. Is there a
way so that you can print preview the current/active record on the form
without having to input the number of the record or the number of the report
page?

Thanks a million

Marc
 
G

Guest

Hello Allen

Finally figured it out (after beating myself and the computer repeatedly!) I
had not put the primary key value on the report or in the query that
generated the report. Hence the fact that the command could not link the
active form to the relevant page of the report. Thanks again for your help.

Marc
 

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