Hello,
Could anyone provide some direction as to why I'm getting a 424 runtime error. The error occurs on the first line of the sub function(the 'set rep' statment). The following is the code that I'm using within a module, that causes the error whenever the module gets called, i.e. ExportToPDF(test):
Sub ExportToPDF(ReportFile As String)
Set rep = appl.OpenReport("C:\Clients\ResdasReport\" & ReportFile & ".rpt")
rep.ExportOptions.DiskFileName = "C:\Clients\ResdasReport\" & ReportFile & ".pdf"
rep.ExportOptions.DestinationType = crEDTDiskFile
rep.ExportOptions.FormatType = crEFTPortableDocFormat
rep.Export False
End Sub
The code creates a PDF file from a MS Access report file. Any help would be greatly appriciated.
Thanks,
Cliff.
Could anyone provide some direction as to why I'm getting a 424 runtime error. The error occurs on the first line of the sub function(the 'set rep' statment). The following is the code that I'm using within a module, that causes the error whenever the module gets called, i.e. ExportToPDF(test):
Sub ExportToPDF(ReportFile As String)
Set rep = appl.OpenReport("C:\Clients\ResdasReport\" & ReportFile & ".rpt")
rep.ExportOptions.DiskFileName = "C:\Clients\ResdasReport\" & ReportFile & ".pdf"
rep.ExportOptions.DestinationType = crEDTDiskFile
rep.ExportOptions.FormatType = crEFTPortableDocFormat
rep.Export False
End Sub
The code creates a PDF file from a MS Access report file. Any help would be greatly appriciated.

Thanks,
Cliff.