J
jhicsupt
I have a form that I am using to prompt for report criteria. When I run the
query outside of the form, it works fine - prompting me for both criteria.
However when I run from the form, I get #Error#. Can you see what I am doing
wrong? Thanks in advance.
I have two combo boxes that I have put in my underlying query. In the
fields of the query are:
[Forms]![frmSelection Criteria Form]![OfficeNumber]
[Forms]![frmSelection Criteria Form]![Manager]
***
On the OnClick event is the following:
Private Sub Command6_Click()
On Error GoTo Err_command6_Click
Dim stDocName As String
stDocName = "RptItems"
DoCmd.OpenReport stDocName, acPreview
Exit_command6_Click:
Exit Sub
Err_command6_Click:
MsgBox Err.Description
Resume Exit_command6_Click
End Sub
query outside of the form, it works fine - prompting me for both criteria.
However when I run from the form, I get #Error#. Can you see what I am doing
wrong? Thanks in advance.
I have two combo boxes that I have put in my underlying query. In the
fields of the query are:
[Forms]![frmSelection Criteria Form]![OfficeNumber]
[Forms]![frmSelection Criteria Form]![Manager]
***
On the OnClick event is the following:
Private Sub Command6_Click()
On Error GoTo Err_command6_Click
Dim stDocName As String
stDocName = "RptItems"
DoCmd.OpenReport stDocName, acPreview
Exit_command6_Click:
Exit Sub
Err_command6_Click:
MsgBox Err.Description
Resume Exit_command6_Click
End Sub