Hi,
I am trying to Export a single record from my customer table and using below codes -
Private Sub lblPDF_Click()
Me.Refresh
Dim myPath As String
Dim stDocName As String
Dim theFileName As String
stDocName = "rptCustomerMaster" (is my Report File name)
>>>DoCmd.OpenReport stDocName, acPreview, , "CustId = " & Nz(Me.CustID, 0)
myPath = "C:\..."
theFileName = "CustID " & CustID & ".pdf"
DoCmd.OutputTo acOutputReport, stDocName, acFormatPDF, theFileName, True
End Sub
Having errors on the highlighted code, could somebody guide me how to resolve it, or is there any support available to export record into PDF file?
I am trying to Export a single record from my customer table and using below codes -
Private Sub lblPDF_Click()
Me.Refresh
Dim myPath As String
Dim stDocName As String
Dim theFileName As String
stDocName = "rptCustomerMaster" (is my Report File name)
>>>DoCmd.OpenReport stDocName, acPreview, , "CustId = " & Nz(Me.CustID, 0)
myPath = "C:\..."
theFileName = "CustID " & CustID & ".pdf"
DoCmd.OutputTo acOutputReport, stDocName, acFormatPDF, theFileName, True
End Sub
Having errors on the highlighted code, could somebody guide me how to resolve it, or is there any support available to export record into PDF file?