Hi I am trying to save a report to pdf for the current record but cant seem to manage this.
I remove the "POID = " & Me.POID, it will save to the correct place but it is not the information on the report for the correct record
Does anyone know what is wroing with the following code
Private Sub Command29_Click()
On Error GoTo Err_Command29_Click
Dim stDocName As String
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
stDocName = "Purchase Order Print"
DoCmd.OutputTo acOutputReport, stDocName, "POID = " & Me.POID, "PDF Format (*.pdf)", "\\Server\cmm\Admin\Purchase Orders\New P0 2010\" & PurchaseOrderNo & "--" & POID & ".pdf", False
Exit_Command29_Click:
Exit Sub
Err_Command29_Click:
MsgBox Err.Description
Resume Exit_Command29_Click
End Sub
Thanks
p.s the error i receive when i run the code is " an expression you entered is the wrong data type for one of the arguments"
I remove the "POID = " & Me.POID, it will save to the correct place but it is not the information on the report for the correct record
Does anyone know what is wroing with the following code
Private Sub Command29_Click()
On Error GoTo Err_Command29_Click
Dim stDocName As String
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
stDocName = "Purchase Order Print"
DoCmd.OutputTo acOutputReport, stDocName, "POID = " & Me.POID, "PDF Format (*.pdf)", "\\Server\cmm\Admin\Purchase Orders\New P0 2010\" & PurchaseOrderNo & "--" & POID & ".pdf", False
Exit_Command29_Click:
Exit Sub
Err_Command29_Click:
MsgBox Err.Description
Resume Exit_Command29_Click
End Sub
Thanks
p.s the error i receive when i run the code is " an expression you entered is the wrong data type for one of the arguments"
Last edited: