J
Jason M Canady
I am using hte following from a command button from a form to launch a
report (see ealier posts...) I thought that I could use the filter property
to retrieve only the results that I needed for my report however that did
not seem to work as I intended. I had early success with WHERE, but now my
SQL is getting more complicated and I am returning an "Object Required"
error when the command is run.
Can someone see a problem that I cannot?
Private Sub Command10_Click()
On Error GoTo Err_Command10_Click
Dim stDocName As String
stDocName = "Annual WorkOrders"
DoCmd.OpenReport stDocName, acPreview, ,
(((WorkOrders.RepeatIntervalamount) = 1) And
((WorkOrders.RepeatIntervalunit) = "yr") And ((equipment.CategoryID) <> 3))
DoCmd.Maximize
DoCmd.RunCommand acCmdZoom100
Exit_Command10_Click:
Exit Sub
Err_Command10_Click:
MsgBox Err.Description
Resume Exit_Command10_Click
End Sub
I could get it to work when I was only using "CategoryID<>3", now...
Any assistance would be most helpful.
Thanks, Jason
report (see ealier posts...) I thought that I could use the filter property
to retrieve only the results that I needed for my report however that did
not seem to work as I intended. I had early success with WHERE, but now my
SQL is getting more complicated and I am returning an "Object Required"
error when the command is run.
Can someone see a problem that I cannot?
Private Sub Command10_Click()
On Error GoTo Err_Command10_Click
Dim stDocName As String
stDocName = "Annual WorkOrders"
DoCmd.OpenReport stDocName, acPreview, ,
(((WorkOrders.RepeatIntervalamount) = 1) And
((WorkOrders.RepeatIntervalunit) = "yr") And ((equipment.CategoryID) <> 3))
DoCmd.Maximize
DoCmd.RunCommand acCmdZoom100
Exit_Command10_Click:
Exit Sub
Err_Command10_Click:
MsgBox Err.Description
Resume Exit_Command10_Click
End Sub
I could get it to work when I was only using "CategoryID<>3", now...
Any assistance would be most helpful.
Thanks, Jason