Automatically name a report when exporting to PDF

  • Follow


Hello,

I have a form with a command button that opens my report in print
preview mode in Access 2007. When I click the Export to PDF/XPS
button, the default file name is the name of the actual report within
Access. I've used VBA to change the report caption to match a field on
my form called PROGRAM. However, this does not transfer over when I
want to save my report to pdf.

How can I make it so that when I click export to pdf/xps, the default
file name is named after a text box called PROGRAM?

Please let me know.

Thanks
0
Reply shm135 6/7/2010 4:17:19 PM

I think you'd have to code a command button to do it, using the OutPutTo
method of the DoCmd object.  Check out the method in Help for more details.

Ken Sheridan
Stafford, England

shm135 wrote:
>Hello,
>
>I have a form with a command button that opens my report in print
>preview mode in Access 2007. When I click the Export to PDF/XPS
>button, the default file name is the name of the actual report within
>Access. I've used VBA to change the report caption to match a field on
>my form called PROGRAM. However, this does not transfer over when I
>want to save my report to pdf.
>
>How can I make it so that when I click export to pdf/xps, the default
>file name is named after a text box called PROGRAM?
>
>Please let me know.
>
>Thanks

-- 
Message posted via http://www.accessmonster.com

0
Reply KenSheridan 6/7/2010 5:34:43 PM


1 Replies
980 Views

(page loaded in 0.035 seconds)

Similiar Articles:
















7/23/2012 3:50:45 PM


Reply: