M
Matthew
I have a report that I set to print "On Open" (in the event tab of the
report properties dialog) with the following code:
Private Sub Report_Open(Cancel As Integer)
DoCmd.PrintOut acPrintAll, , , , 1, True
End Sub
The problem is: when I open the report it tries to run the code then gives
me this message:
Run-time error '2585':
This action can't be carried out while processing a form or report event.
I have also tried a VB Module:
Function test()
DoCmd.OpenReport "NewCatalog", acViewPreview, "", "", acNormal
DoCmd.PrintOut acPrintAll, , , , 1, True
DoCmd.Close acReport, "NewCatalog"
End Function
This gave me the same error.
Any ideas?
Matthew
report properties dialog) with the following code:
Private Sub Report_Open(Cancel As Integer)
DoCmd.PrintOut acPrintAll, , , , 1, True
End Sub
The problem is: when I open the report it tries to run the code then gives
me this message:
Run-time error '2585':
This action can't be carried out while processing a form or report event.
I have also tried a VB Module:
Function test()
DoCmd.OpenReport "NewCatalog", acViewPreview, "", "", acNormal
DoCmd.PrintOut acPrintAll, , , , 1, True
DoCmd.Close acReport, "NewCatalog"
End Function
This gave me the same error.
Any ideas?
Matthew