Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Export rpt to PDF
Jeffery Adams 
     
4 years ago
Export report to PDF with dynamic file name...When sending by email I get the correct File name I put in the Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer) but how can I do the same when I click on the export to PDF?
Jeffery Adams OP  @Reply  
     
4 years ago

Adam Schwanz  @Reply  
           
4 years ago
Are you using vba outputreport? You can name it whatever you want there. Or are you saying you want to use the button and have the default word show up there?
Jeffery Adams OP  @Reply  
     
4 years ago
right I am saying Just use the button on the ribbon at this time and have the dynamic file name like above.
Adam Schwanz  @Reply  
           
4 years ago
Ah, sorry I can't give you a good answer, I don't really know much about those buttons, I learned VBA and didn't have a need for them. Normally in this case I would just add a button and use VBA to do it, I'm not sure if there's a property to interact with those default buttons. I would wait and see if anyone else has any ideas but...

The button appears to default to the name of the report, so as a LAST option if you HAVE to use that button and there are no other solutions. You could use docmd.rename to change the name of the report to what you want it to be (this seems to be what that default file explorer chooses), and then change it back in the on close event.
Adam Schwanz  @Reply  
           
4 years ago
At that point you're making it way complex too for a 1 line VBA statement, just use VBA to export to PDF if nobody else has a simple solution ;).
Jeffery Adams OP  @Reply  
     
4 years ago
ok, so just put the button on the report and make it not printable right?
Adam Schwanz  @Reply  
           
4 years ago
Yea you could do that, Display when: Screen only
Jeffery Adams OP  @Reply  
     
4 years ago
Ok so i did that but I can get the button to show on printview even when I select  Display = Always.  I am using acViewPreview
Adam Schwanz  @Reply  
           
4 years ago
So opening it like that is setting it into Print Preview mode, which we don't want. We want Report View mode to be able to interact with the button and not have it come up when printing. Try using acViewReport instead

Jeffery Adams OP  @Reply  
     
4 years ago
Awesome that worked thanks for all your help and advice

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/7/2026 2:27:29 AM. PLT: 0s