Commandbutton should open printdialog

R

renmoo

Hi,

I have a form with a commandbutton which prints the current record in a
report. That works fine, but what I would like that commandbutton to do
is show the standard printdialog, so I can choose a different printer
instead of the default printer, change the number of copies, etc,...

I don't want to use the menubar

Maybe it's very simple, but I don't know how...

Thnx,

René
 
R

renmoo

OK, thanks, the code produces the dialogbox I wanted, but it prints the
form in stead of the report I created. I want the commandbutton on the
form to print the report for this form.

René


Dennis schreef:
 
L

Larry Linson

Read Help about the DoCmd.OpenReport statement. I believe that's what you'll
want to use in the Command Button's Click event.

Larry Linson
Microsoft Access MVP

OK, thanks, the code produces the dialogbox I wanted, but it prints the
form in stead of the report I created. I want the commandbutton on the
form to print the report for this form.

René


Dennis schreef:
 
R

renmoo

Larry,

The button on my form already does that. I mean, it prints the report I
want. No problem here. But what I would like is to see the printdialog.
The DoCmd.DoMenuItem action gives me the printdialog, but it prints all
of the records and not the current one. It also prints the form in
stead of the report.

The button on my form starts a macro which prints the report with
current ID. When I choose preview, then select File, Print, I also get
the printdialog. But I want my commandbutton todo this action.

René


Larry Linson schreef:
 

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