Dachande11
Registered User.
- Local time
- Today, 06:07
- Joined
- May 1, 2001
- Messages
- 41
Hello I have been searching through this forum to find a way of exporting a report to a PDF file. I have found the answer and tried to get it to work but keep getting an error 2202 (you must install a printer before you print etc.).
I was wondering if anybody knew what I was doing wrong as I am a novice when it comes to VBA.
I have inserted the relevant code into the win.ini file, although I could not see a "[ports]" section as described in the posts I have viewed.
I have imported all of the modules from the defaultprt.mdb file.
I also added the extra bit of code into a new module and then used the code below on a 'On Click event'
Private Sub test_Click()
ChangeToAcrobat
ChangePdfFileName "test.pdf"
DoCmd.OpenReport "CBA_Data_Master_Cross", acViewNormal
ResetDefaultPrinter
End Sub
I hope I have explained this ok and I would appreciate any help.
Thanks
Mark
I was wondering if anybody knew what I was doing wrong as I am a novice when it comes to VBA.
I have inserted the relevant code into the win.ini file, although I could not see a "[ports]" section as described in the posts I have viewed.
I have imported all of the modules from the defaultprt.mdb file.
I also added the extra bit of code into a new module and then used the code below on a 'On Click event'
Private Sub test_Click()
ChangeToAcrobat
ChangePdfFileName "test.pdf"
DoCmd.OpenReport "CBA_Data_Master_Cross", acViewNormal
ResetDefaultPrinter
End Sub
I hope I have explained this ok and I would appreciate any help.
Thanks
Mark