Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MS Access 2010 SendObject using .pdf Format for Report

Posted on 2012-03-15
7
Medium Priority
?
938 Views
Last Modified: 2012-03-28
I am using MS Access 2010.  I converted a database from 2003 to 2010.  There is a print preview report that appears and a button added to the Add-Ins tab of the ribbon for the SendObject macro to email the report but it doesn't work.  It was set to mail a snapshot so I changed it to .pdf instead.  When I click the button the window appears stating one page of the report has been created but it hangs up here.  It never opens Outlook 2010 to attach the report.

Thinking that everything I needed may not have been installed I tried to save and publish this same report as a .pdf and that worked fine so I'm thinking I have everything I need to do this.  I found a lot of information, some for add-ins in 2007 that are needed and other information stating that .pdf is built in and nothing is needed.  Can someone please shed some light on why this won't work?

Also, I know you can do this with VBA but I am not a programmer so I prefer to go the route of the macro first.  Thanks in advance for your help.
0
Comment
Question by:avlna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 40

Expert Comment

by:als315
ID: 37726127
In Access 2010 you have Send button on Export Ribbon. Have you tested it?
Code for your button should be like this:
DoCmd.SendObject acSendReport, Screen.ActiveReport.Name, acFormatPDF
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37726623
<No Points wanted>

It is not clear if this custom button even worked...?
...or how it was created/coded,...?
.......or how you modified it ...?
.....or how, or if the email address get populated...
...etc

To be safe, I try to put any custom functionality on a form.
So I would use code like als315 posted, but on a button on a form.

Get something simple like this working *First*, ...then worry about putting it on a Ribbon later.

;-)

JeffCoachman
0
 

Author Comment

by:avlna
ID: 37728922
This was created in Access 2003 and it worked until it was converted to 2010.  The problem is that I can no longer use the snapshot because it doesn't exist in 2010 so I needed to change it to a .pdf and now it hangs up.

als315 - As I stated I'm not a programmer so I don't even know what to do with your code.

boag2000 - Yes, it worked in 2003 but not after converting to 2010.  That is why I changed the .snp to .pdf.

It was created so when it's clicked a macro runs using SendObject.

I modified it by opening the macro in design view and changing the Output Format from .snp to .pdf.  (see attached)

The email field doesn't get populated.  It's an optional field and the person sending the report will fill in the To: field once the email opens.

This is a report, not a form and the report is generated after the data is entered.  It is not necessary to close the form and then generate a report to send it.

I didn't attach it to the ribbon that happened when it was converted.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37729285
Then again, I would simply ignore/disable this in the ribbon and do it from a form/report with code similar to what the first Expert posted.

Again, unless you want to get involved in customizing ribbons, I would just do this directly in code.
0
 

Accepted Solution

by:
avlna earned 0 total points
ID: 37729666
Customizing ribbons, like toolbars, is very easy and Access has an option for it.

This turned out not to be an Access issue but anOutlook issue.  Access did still need the .snp to be changed to a .pdf but once Outlook was reinstalled no other changes needed to be made and it worked fine.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37730421
<Customizing ribbons, like toolbars, is very easy and Access has an option for it.>
Customizing ribbons is still a long way from being "Easy" for most new Access developers...
...As is evidenced by the hundreds of question here on how to do this...

I'm glad you got your issue sorted..

;-)

Jeff
0
 

Author Closing Comment

by:avlna
ID: 37775693
I accepted my own because that resolved the problem and also because when I tried to delete the questions the instructions from Expert Exchange said to do that.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question