Print Problem

D

Duck

I have a form with a button from which I want to print 3 reports. I
built a macro which opens and then printout each report one after the
other. The problem is that access prints out the report followed by
the form from which the print action is initiated. I also tried
closing the form in the macro, before print the reports which prints
each report followed by printing the switchboard...what am I doing
wrong?
 
J

John W. Vinson

I have a form with a button from which I want to print 3 reports. I
built a macro which opens and then printout each report one after the
other. The problem is that access prints out the report followed by
the form from which the print action is initiated. I also tried
closing the form in the macro, before print the reports which prints
each report followed by printing the switchboard...what am I doing
wrong?

Since you don't post the steps of your macro, it's only a guess... but if
you're using the Printout method (without arguments), that prints out *the
currently active form*.

I'd do it in VBA code, and use the OpenReport method three times. By default
that prints the report; it's not necessary to follow it with the Printout
method.


John W. Vinson [MVP]
 
D

Duck

Since you don't post the steps of your macro, it's only a guess... but if
you're using the Printout method (without arguments), that prints out *the
currently active form*.

I'd do it in VBA code, and use the OpenReport method three times. By default
that prints the report; it's not necessary to follow it with the Printout
method.

John W. Vinson [MVP]

I guess I should have mentioned that on the computer in question
access 2000 is in use. I do use the OpenReport method three times in
code on my other two systems (which run access 2003), but this doesn't
seem to work on the access 2000 system. This is why I went to the
macro method in the first place.

The macro goes like this:

OpenReport - (Report Name report A)
Close - (FormNme iniiating form)
PrintOut
OpenReport - (Report Name report B)
PrintOut
OpenReport - (Report Name report C)
PrintOUt
Close - (Report A)
Close - (Report B)
Close - (Report C)
 
J

John W. Vinson

The macro goes like this:

OpenReport - (Report Name report A) ... this opens and prints the report...
Close - (FormNme iniiating form)
PrintOut ... and this prints the active form.
OpenReport - (Report Name report B)
PrintOut ... this prints the active form, again...
OpenReport - (Report Name report C)
PrintOUt ... and this prints the active form, yet again.
Close - (Report A)
Close - (Report B)
Close - (Report C)

Take a look at the online help for OpenReport and PrintOut. It's just that
they don't do what you are thinking that they do.

Just remove the printout lines.

John W. Vinson [MVP]
 

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