print

  • Thread starter Thread starter Joel Allen
  • Start date Start date
J

Joel Allen

Hello,

In a macro, I have it opening a report. Is there a way to also make it
automaticall print to a html or pdf file?

Thanks,
Joel
 
Joel,

To use a macro to produce an html file from a report, use the OutputTo
action. Note that any graphics on the report will not be reproduced in
the html file, and there are other restrictions as well.

To print to a PDF, you will need a PDF writer utility installed on your
computer. If so, you can go to the design view of the report, and under
the File|Page Setup menu, you can set the PDF driver as the "specified
printer" to use for that report. Then, using the OpenReport action in
your macro will output the report to pdf.
 
Thank you, this helps a great deal. Now, all I need to know is the code to
run a specific macro.
From a Data Access Page, I will have command buttom to run the maco. Will
you help please? Thanks so much.

Joel
 
Joel,

I am sorry, I am not familiar with DAPs. In an Access form, you would
simply go to the Properties of the command button, and enter the name of
the macro in the On Click event property. I am not sure whether it is a
similar process in a DAP.
 
Thanks Steve.

Steve Schapel said:
Joel,

I am sorry, I am not familiar with DAPs. In an Access form, you would
simply go to the Properties of the command button, and enter the name of
the macro in the On Click event property. I am not sure whether it is a
similar process in a DAP.
 
You cannot run an ACCESS macro from a DAP. You must use VBScript in the
page's module in order to run any type of code/programming. You can use the
Click event of the command button to run a script -- but do note that
VBScript does not have all the capabilities of VBA; nor does it do debugging
very well (actually, does it very poorly); and it uses ADO recordsets, not
DAO ones.

You also cannot print reports from DAPs; you can print the DAP page itself.
 
Back
Top