473,378 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

saving report to PDF

Hello,
I need to save my access report (named 'reportall) to PDF. Taking reference from a Youtube video, I entered following code(provided below). But when I click on the button, it says Run-time error 2282. The format in which you are attempting to output the current object is not available."
Please help me out
Expand|Select|Wrap|Line Numbers
  1. Private Sub btnpdf_Click()
  2. Dim filename As String
  3. Dim filepath As String
  4. filename = Me.Title0.Caption
  5. filepath = "Desktop\Paths" & filename & ".pdf"
  6. DoCmd.OutputTo acOutputReport, "reportall", acFormatPDF, filepath
  7. MsgBox ("Successfully saved as PDF")
  8. End Sub
Thank is advance :)
Nov 23 '17 #1

✓ answered by jimatqsi

What version of Office are you using? There are some posts on the 'Net about having to install service packs to various Office versions in order to have the necessary formats for the OutputTo command. Is your system fully updated?

Jim

2 2329
jimatqsi
1,271 Expert 1GB
What version of Office are you using? There are some posts on the 'Net about having to install service packs to various Office versions in order to have the necessary formats for the OutputTo command. Is your system fully updated?

Jim
Nov 23 '17 #2
I installed office 365 and it works all fine for now.
Thanks
Nov 29 '17 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bob Murdoch | last post by:
We have an asp application that creates reports from a database. The managers would like to create the report, view the results, add a comment, and save the report so that he can send a link to...
18
by: pltmcs | last post by:
I am building lock shop software to accept an electronic signature when university personnel are given keys. Currently a paper report is generated that the person signs. The signed paper is then...
4
by: zaiena | last post by:
hello, i'm trying to make a button that export my report to word or pdf formate i'm trying to use macros to that but it doesn't help me.maby i can use procedure code instead of macros code. is there...
4
by: Contralto | last post by:
Hi, I can convert my report to Adobe PDF, but the photos are very poor. They were taken as RAW images and I've tried saving them at different resolutions as JPEGs, but it doesn't seem to make...
1
by: MSwanston | last post by:
Hi I need some help with saving retreiving data from the cache, and how best to structure my code. FYI am working in VS2005/under .NET2 Framework. Ok, we have a series of reports that get run via...
6
by: Eddie | last post by:
Hi all, I am displaying a number of reports, and giving the users an option to display them on the web or download them to Excel. If they want the Excel file, I just use the PHP header command...
3
HERBERTS
by: HERBERTS | last post by:
Some applications require the storing of report templates in a database. This simplifies template support - all reports are stored in one place, and allows to differentiate the access rights to...
8
gnawoncents
by: gnawoncents | last post by:
Greetings, I have a report (Report1) that I create and save using VBA coding when the user presses a button. In order to preserve the same report name without having to prompt the user, I first...
3
by: epifinygirl | last post by:
I currently have a report that summarizes my data for each client from the table (each page summarizes the information for each client). I have VBA code all set that can filter each client and print...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.