HeelNGville
Registered User.
- Local time
- Today, 08:18
- Joined
- Apr 13, 2004
- Messages
- 71
Preface this with thanks in advance for any assistance in resolving this matter.
I have a form with a command button that is set to print an invoice report on the on click event. Code as follows:
Private Sub cmdPrint_Click()
On Error GoTo Err_cmdPrint_Click
DoCmd.RunCommand acCmdSaveRecord
Dim stDocName As String
Me.Visible = False
stDocName = "Shipping Order"
DoCmd.OpenReport stDocName, acNormal
Exit_cmdPrint_Click:
Exit Sub
Err_cmdPrint_Click:
MsgBox Err.Description
Resume Exit_cmdPrint_Click
End SubWithin the Shipping Order report is the field "ShipOrderNumber".
What I would like to do is:
On the on click event,
(A) Print the report
(B) Export the report to C:/My Documents/ ----Use value from "ShipOrderNumber" field as report name.pdf (or snapshot). Example. If the shiporder number is 1234, export would be -C:/My Documents/1234.pdf
Currenlty using A2K.
Thx
I have a form with a command button that is set to print an invoice report on the on click event. Code as follows:
Private Sub cmdPrint_Click()
On Error GoTo Err_cmdPrint_Click
DoCmd.RunCommand acCmdSaveRecord
Dim stDocName As String
Me.Visible = False
stDocName = "Shipping Order"
DoCmd.OpenReport stDocName, acNormal
Exit_cmdPrint_Click:
Exit Sub
Err_cmdPrint_Click:
MsgBox Err.Description
Resume Exit_cmdPrint_Click
End SubWithin the Shipping Order report is the field "ShipOrderNumber".
What I would like to do is:
On the on click event,
(A) Print the report
(B) Export the report to C:/My Documents/ ----Use value from "ShipOrderNumber" field as report name.pdf (or snapshot). Example. If the shiporder number is 1234, export would be -C:/My Documents/1234.pdf
Currenlty using A2K.
Thx