Iam exporting an Access report to to an RTF file.
I want to rename the file on each output by an automatic increment of 1 EG Order1,Order2,Order3 and so on.
I am using the following code
Private Sub CmdExport_Click()
On Error GoTo Err_CmdExport_Click
Dim stDocName As String
stDocName = "Order"
DoCmd.OutputTo acReport, stDocName, acFormatRTF, "C:\Orders\Orders.rtf"
Exit_CmdExport_Click:
Exit Sub
Err_CmdExport_Click:
MsgBox Err.Description
Resume Exit_CmdExport_Click
Does anyone have a solution?
Errolf
I want to rename the file on each output by an automatic increment of 1 EG Order1,Order2,Order3 and so on.
I am using the following code
Private Sub CmdExport_Click()
On Error GoTo Err_CmdExport_Click
Dim stDocName As String
stDocName = "Order"
DoCmd.OutputTo acReport, stDocName, acFormatRTF, "C:\Orders\Orders.rtf"
Exit_CmdExport_Click:
Exit Sub
Err_CmdExport_Click:
MsgBox Err.Description
Resume Exit_CmdExport_Click
Does anyone have a solution?
Errolf