473,327 Members | 2,016 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,327 software developers and data experts.

Access 97 Reports Printing to PDF

Hi

I have an access database in which I''ve set reports to prpint to a PDF printer installed on the network. The problem is the reports are automatically placed in a my_pdfs directory in the user's my documents folder, but each report is given the same name by default so they are atomatically replaced.

The only code behind the button is:

Private Sub cmd_print_rpt1_Click()
On Error GoTo Err_cmd_print_rpt1_Click

Dim stDocName As String
stDocName = "rpt_maint_reports_all_outstanding_jobcards_total_ by_pes_mgr"
DoCmd.OpenReport stDocName, acNormal

Exit_cmd_print_rpt1_Click:
Exit Sub

Err_cmd_print_rpt1_Click:
MsgBox Err.Description
Resume Exit_cmd_print_rpt1_Click

End Sub

Please help.
Jen
Jul 25 '07 #1
1 2335
JConsulting
603 Expert 512MB
Hi

I have an access database in which I''ve set reports to prpint to a PDF printer installed on the network. The problem is the reports are automatically placed in a my_pdfs directory in the user's my documents folder, but each report is given the same name by default so they are atomatically replaced.

The only code behind the button is:

Private Sub cmd_print_rpt1_Click()
On Error GoTo Err_cmd_print_rpt1_Click

Dim stDocName As String
stDocName = "rpt_maint_reports_all_outstanding_jobcards_total_ by_pes_mgr"
DoCmd.OpenReport stDocName, acNormal

Exit_cmd_print_rpt1_Click:
Exit Sub

Err_cmd_print_rpt1_Click:
MsgBox Err.Description
Resume Exit_cmd_print_rpt1_Click

End Sub

Please help.
Jen

Hi Jen,
Not sure what you want to do with the PDF's. Rename them? Move them?

You can add a line in your button code to use the FileCopy command. You can set the source/file and destination/file to move, rename, or whatever.

Follow that with kill "c:\whatever\filename.pdf" to delete the file.

Hope it helps.
J
Jul 31 '07 #2

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

Similar topics

1
by: Hank Reed | last post by:
For about a year I have been printing pdf files from Access 2000 using the ShellExecute Me.hWnd, "print", FileName, "", 0, SW_SHOWNORMAL We normally print, from 1 to 100 engineering documents in...
2
by: Lumpierbritches | last post by:
Thank you in advance for any and all assistance. I recently purchased an Ink Dye Sublimation printer and I'm looking to do something with Access for my employee ID Cards. I know I shouldn't store...
15
by: Mark C | last post by:
All, I have exhaustingly been looking through the newsgroups in search of a way to systemically output an Access 97 report to a pdf file using the full version of Adobe Acrobat. I want the user...
2
by: Tony Lennard | last post by:
Hello all, I have a database of links to bitmaps, eg c:/pic/001.bmp, and I want to display the pictures in a report. Is this possible at all? Thanks for any info, Tony Lennard
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
12
by: Wadim Grasza | last post by:
I want to store and display (on a form or a report) multiple pictures per record in an access database. The pictures are not stored within the database. They are stored as files and the database...
13
by: salad | last post by:
Hi Guys: I was stuck. I needed to send a report to a file. My beautiful report(s) in Access were going to require loss of formatting with RTFs, a PITA in WordMailMerge, sending it as a text...
1
by: telim.albert | last post by:
I have a form and a database that display the pictures of personnel but it is not binding to the reports
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.