Add PRINT command button to REPORT

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to add a print command button to a report on "preview view"?
I am able to add a command button but doesn't allow me to add an action. I
know the command button can be added from the form, but I need to preview the
report first and I dont like that I have to go to the file menu to print.
Thanks for your help!
David
 
No. You cannot put command buttons on reports that you then can click to run
code. Continue using the Print menu.
 
David: I do this another way, I don't know whether you know about this
already, but here goes...

I add preview and print commands to my forms and switchboard. To preview a
report from a form or switchboard, you must first create a query for your
particular table. On the field that you want to preview, which must be unique
(like the autonumber field), type [enter record number]. Save and close.

With your form in design view, click on "label" on toolbar. Place your
cursor on the location of your form that you want this box to be placed.
Next type in description of action, i.e. "Print and preview this record".
Next right click on the box and choose build event. Choose macro. Type the
following on the lines
Echo
Save (must state form you are in below)
Close (choose Form, then name of form you are in)
Open Report (Choose report name and print preview below)
Maximize.
Save as MAcro 1 or whatever you choose to call it.
Now when you open your form,and press this button, a prompt will ask you to
"enter record number". Then you will see you report in preview mode and then
you can print.
Hope this helps.
 
Thanks Bonnie! I did try it out, but it isn't what I am looking to
accomplish ! :( Thanks for your reply !
David

Bonnie43 said:
David: I do this another way, I don't know whether you know about this
already, but here goes...

I add preview and print commands to my forms and switchboard. To preview a
report from a form or switchboard, you must first create a query for your
particular table. On the field that you want to preview, which must be unique
(like the autonumber field), type [enter record number]. Save and close.

With your form in design view, click on "label" on toolbar. Place your
cursor on the location of your form that you want this box to be placed.
Next type in description of action, i.e. "Print and preview this record".
Next right click on the box and choose build event. Choose macro. Type the
following on the lines
Echo
Save (must state form you are in below)
Close (choose Form, then name of form you are in)
Open Report (Choose report name and print preview below)
Maximize.
Save as MAcro 1 or whatever you choose to call it.
Now when you open your form,and press this button, a prompt will ask you to
"enter record number". Then you will see you report in preview mode and then
you can print.
Hope this helps.

DavidGuaman said:
Is it possible to add a print command button to a report on "preview view"?
I am able to add a command button but doesn't allow me to add an action. I
know the command button can be added from the form, but I need to preview the
report first and I dont like that I have to go to the file menu to print.
Thanks for your help!
David
 
DavidGuaman said:
Is it possible to add a print command button to a report on "preview view"?
I am able to add a command button but doesn't allow me to add an action. I
know the command button can be added from the form, but I need to preview the
report first and I dont like that I have to go to the file menu to print.
Thanks for your help!
David


Hi David,

You could run code from the on open event of the report to open a very
small form with a button and instruction to print the report. That way
you can run code to automatically specify print options.

Hope the idea helps,

Jeff
 
Back
Top