B
Brook
Error 2585 This Action cannot be carried out while processing a form or report
I have my orders form (frmorders) that I use for new orders and after all
the information is added the user clicks on a command button that allows them
to print the current order, rptcustomorder.
For the custom order report, I have it set up so that on close, I have the
following code to save the file to my hard drive:
begin code:
Private Sub Report_Close()
Dim strReportName As String
Dim strOutputName As String
strReportName = "rptcustomorders(I)"
strOutputName = DLookup("[OrdNum]", "qryinventory") & _
" - " & Format(Date, "dd/mm/yyyy")
DoCmd.OutputTo acOutputReport, strReportName, "Rich Text Format", _
strOutputName, True
End Sub
End Code....
From what i have read online this is due to the fact that the form is open
and trying to use the report?? am I correct?
how do I get around this error? do I need to close my form prior tothe save
event of the report and then reopen the form?
Any ideas? suggestions are appreciated... I have racked my brain with this
one...
Brook
I have my orders form (frmorders) that I use for new orders and after all
the information is added the user clicks on a command button that allows them
to print the current order, rptcustomorder.
For the custom order report, I have it set up so that on close, I have the
following code to save the file to my hard drive:
begin code:
Private Sub Report_Close()
Dim strReportName As String
Dim strOutputName As String
strReportName = "rptcustomorders(I)"
strOutputName = DLookup("[OrdNum]", "qryinventory") & _
" - " & Format(Date, "dd/mm/yyyy")
DoCmd.OutputTo acOutputReport, strReportName, "Rich Text Format", _
strOutputName, True
End Sub
End Code....
From what i have read online this is due to the fact that the form is open
and trying to use the report?? am I correct?
how do I get around this error? do I need to close my form prior tothe save
event of the report and then reopen the form?
Any ideas? suggestions are appreciated... I have racked my brain with this
one...
Brook