This error appears when a preview or print button is used. The form has been opened with this.....
DoCmd.OpenForm stDocName, , , , acFormAdd, acWindowNormal
But when I try to preview it gets the error.......
"Object doesnt support this property........."
Same error occurs when the form is opened with.....
DoCmd.OpenForm stDocName, , , , acFormReadOnly, acWindowNormal, stLinkCriteria
The preview button is this.........
Private Sub cmdPreviewRptWO_Click()
On Error GoTo Err_cmdPreviewRptWO_Click
Dim stDocName As String
stDocName = "rptWorkOrderCurrent"
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport stDocName, acPreview
Exit_cmdPreviewRptWO_Click:
Exit Sub
The really strange thing is I have 2 forms both coding the same..... One doesnt give the error!!
I think the error occurs when it is trying to save before previewing...But it has to save to view the report.
Anyone have the answer??
DoCmd.OpenForm stDocName, , , , acFormAdd, acWindowNormal
But when I try to preview it gets the error.......
"Object doesnt support this property........."
Same error occurs when the form is opened with.....
DoCmd.OpenForm stDocName, , , , acFormReadOnly, acWindowNormal, stLinkCriteria
The preview button is this.........
Private Sub cmdPreviewRptWO_Click()
On Error GoTo Err_cmdPreviewRptWO_Click
Dim stDocName As String
stDocName = "rptWorkOrderCurrent"
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport stDocName, acPreview
Exit_cmdPreviewRptWO_Click:
Exit Sub
The really strange thing is I have 2 forms both coding the same..... One doesnt give the error!!
I think the error occurs when it is trying to save before previewing...But it has to save to view the report.
Anyone have the answer??