O
Opal
I am attempting to open a report with more than one where condition
and I am getting a Type Mismatch error. I can't figure out quite how
to get this to work.
Private Sub cmdOK_Click()
On Error GoTo Err_cmdOK_Click
Dim stDocName As String
Dim stWhere As String
If Len([cboFilter1] & "") <> 0 And Len([cboSearchReportsTo] & "") = 0
_
And Len([cboZone] & "") <> 0 And _
Len([cboSearchTM] & "") = 0 And Len([cboSearchDept] & "") <> 0 Then
stWhere = ("ZoneID =" & cboZone) And ("DeptID =" &
cboSearchDept)
DoCmd.OpenReport "rptByShop", acPreview, , stWhere
End If
First of all, can I filter a report through a form with more than one
where condition?
The user selects "conditions" from a drop down form and the report
opens based on their selections. I am trying to get the report to
open based on more than one where condition and cannot figure
out if this can be accomplished. Any assistance will be appreciated.
and I am getting a Type Mismatch error. I can't figure out quite how
to get this to work.
Private Sub cmdOK_Click()
On Error GoTo Err_cmdOK_Click
Dim stDocName As String
Dim stWhere As String
If Len([cboFilter1] & "") <> 0 And Len([cboSearchReportsTo] & "") = 0
_
And Len([cboZone] & "") <> 0 And _
Len([cboSearchTM] & "") = 0 And Len([cboSearchDept] & "") <> 0 Then
stWhere = ("ZoneID =" & cboZone) And ("DeptID =" &
cboSearchDept)
DoCmd.OpenReport "rptByShop", acPreview, , stWhere
End If
First of all, can I filter a report through a form with more than one
where condition?
The user selects "conditions" from a drop down form and the report
opens based on their selections. I am trying to get the report to
open based on more than one where condition and cannot figure
out if this can be accomplished. Any assistance will be appreciated.