myHi all!
I already read a lot of earlier questions on this subject, but the answers
just didn't seem to help in my case. I hope one of you can help me out:
Several persons will have access to my database. When they have added the
network pdf printer (called "PDFCreator") they should be able to print single
records as pdf documents. However, the button I've added to make this
possible, does not work. Literally, it contains the following code:
'****************************
Private Sub btnPrintAlsPDF_Click()
On Error GoTo Err_btnPrintAlsPDF_Click
Dim strDocName As String
Dim strWhere As String
strDocName = "rptMyReport"
strWhere = "[Id_Record]=" & Me!Id_Record
DoCmd.OpenReport strDocName, acViewPreview, , strWhere
Application.Reports(strDocName).Printer =
Application.Printers("PDFCreator")
Exit_btnPrintAlsPDF_Click:
Exit Sub
Err_btnPrintAlsPDF_Click:
MsgBox Err.Description
Resume Exit_btnPrintAlsPDF_Click
End Sub
'****************************
The error occurs in the part Application.Printers("PDFCreator"). It says
"Ongeldige procedure-aanroep of ongeldig argument", which means something
like "invalid call for the procedure, or invalid argument".
Can somebody please tell me what is needed to fix this problem?
|
|
0
|
|
|
|
Reply
|
Utf
|
1/18/2008 10:59:01 AM |
|
I've solved one part of the problem: the name of the PDF printer was
incomplete. Now this is solved, the error message has gone. But still there
is no pdf created! What can be wrong?
"Sietske" wrote:
> myHi all!
>
> I already read a lot of earlier questions on this subject, but the answers
> just didn't seem to help in my case. I hope one of you can help me out:
>
> Several persons will have access to my database. When they have added the
> network pdf printer (called "PDFCreator") they should be able to print single
> records as pdf documents. However, the button I've added to make this
> possible, does not work. Literally, it contains the following code:
>
> '****************************
>
> Private Sub btnPrintAlsPDF_Click()
> On Error GoTo Err_btnPrintAlsPDF_Click
>
> Dim strDocName As String
> Dim strWhere As String
> strDocName = "rptMyReport"
> strWhere = "[Id_Record]=" & Me!Id_Record
> DoCmd.OpenReport strDocName, acViewPreview, , strWhere
> Application.Reports(strDocName).Printer =
> Application.Printers("PDFCreator")
>
> Exit_btnPrintAlsPDF_Click:
> Exit Sub
>
> Err_btnPrintAlsPDF_Click:
> MsgBox Err.Description
> Resume Exit_btnPrintAlsPDF_Click
>
> End Sub
>
> '****************************
>
> The error occurs in the part Application.Printers("PDFCreator"). It says
> "Ongeldige procedure-aanroep of ongeldig argument", which means something
> like "invalid call for the procedure, or invalid argument".
>
> Can somebody please tell me what is needed to fix this problem?
|
|
0
|
|
|
|
Reply
|
Utf
|
1/18/2008 12:30:00 PM
|
|
The other problem is solved too, now.
I simply replaced
Application.Reports(strDocName).Printer =
Application.Printers("NameOfMyNetworkPrinter")
with
Application.Reports(strDocName).Printer = Printers("NameOfMyNetworkPrinter")
Now it works great, thanks to the website of Helen Feddema.
Bye!
Sietske
"Sietske" wrote:
> myHi all!
>
> I already read a lot of earlier questions on this subject, but the answers
> just didn't seem to help in my case. I hope one of you can help me out:
>
> Several persons will have access to my database. When they have added the
> network pdf printer (called "PDFCreator") they should be able to print single
> records as pdf documents. However, the button I've added to make this
> possible, does not work. Literally, it contains the following code:
>
> '****************************
>
> Private Sub btnPrintAlsPDF_Click()
> On Error GoTo Err_btnPrintAlsPDF_Click
>
> Dim strDocName As String
> Dim strWhere As String
> strDocName = "rptMyReport"
> strWhere = "[Id_Record]=" & Me!Id_Record
> DoCmd.OpenReport strDocName, acViewPreview, , strWhere
> Application.Reports(strDocName).Printer =
> Application.Printers("PDFCreator")
>
> Exit_btnPrintAlsPDF_Click:
> Exit Sub
>
> Err_btnPrintAlsPDF_Click:
> MsgBox Err.Description
> Resume Exit_btnPrintAlsPDF_Click
>
> End Sub
>
> '****************************
>
> The error occurs in the part Application.Printers("PDFCreator"). It says
> "Ongeldige procedure-aanroep of ongeldig argument", which means something
> like "invalid call for the procedure, or invalid argument".
>
> Can somebody please tell me what is needed to fix this problem?
|
|
0
|
|
|
|
Reply
|
Utf
|
1/18/2008 12:52:01 PM
|
|
|
2 Replies
641 Views
(page loaded in 0.042 seconds)
Similiar Articles: Error when trying to print to pdf using pdf printer on network ...Word 2007 will not print to PDF - microsoft.public.word ... I have Nitro PDF Pro installed and am trying ... email, no printer installed - microsoft ... email as pdf ... Word 2007 will not print to PDF - microsoft.public.word ...Error when trying to print to pdf using pdf printer on network ... Word 2007 will not print ... From Word | eHow.com How to Print a PDF From Word. Portable Document Format ... Printing to default and pdf printer simultaneously - microsoft ...Error when trying to print to pdf using pdf printer on network ... Printing to default ... The Portable Document Format, or ... Print the Report to PDF Load the PDF docs ... there is a problem with the selected printer - microsoft.public ...... to pdf using pdf printer on network ... there is a problem with the selected printer - microsoft.public ... Error when trying to print to pdf using pdf printer on network ... Access 2007 Error message printer information - microsoft.public ...Error when trying to print to pdf using pdf printer on network ... OutputTo PDF error 2501 The OutputTo action was cancelled ... Using Access 2007 ... Create Button to Print Report to PDF - microsoft.public.access ...Error when trying to print to pdf using pdf printer on network ... Create Button to ... PDF files and print ... Access VBA Code The portable document format (PDF) is the ... scan to pdf twain or networkscanner - microsoft.public.dotnet ...Error when trying to print to pdf using pdf printer on network ... From Word | eHow.com How to Print a PDF From Word. Portable Document Format ... ... scan to pdf twain or ... Error when printing report - microsoft.public.accessError when trying to print to pdf using pdf printer on network ... myHi all! I already read a lot of earlier questions on this subject, but the answers just didn't seem to ... unable to print from word, excel, outlook 2007 or pdf files in vis ...... to printer when i try to print a word document, word gives me the following error ... to print from word, excel, outlook 2007 or pdf files in vis ... > the network is ... The path where you are trying to save this document is unavailable ...Error when trying to print to pdf using pdf printer on network ... The path where you are trying to save this document is unavailable ... However when I make any change to ... Error when trying to print to pdf using pdf printer on network ...Word 2007 will not print to PDF - microsoft.public.word ... I have Nitro PDF Pro installed and am trying ... email, no printer installed - microsoft ... email as pdf ... Unable to Print PDF File | printer - Printer repair and support by ...Try to print a PDF file such as the first page ... Sometimes, when you print a file that is on a thumb drive or a network, the ... Printer Drivers Printer Errors Printer ... 8/1/2012 7:05:14 AM
|