I am using a multiple filters to search for specific criteria. In one of the filters criteria, I need to use the OR instead of the AND as illustrated below. When insterting the OR it will not recognize the other criteria.
Code:
If Not IsNull(Me.cboState) Then
strWhere = strWhere & "([state] = """ & Me.cboState & """) AND "
End If
If Not IsNull(Me.cboSurvey1) Then
strWhere = strWhere & "([surveyor_1] = """ & Me.cboSurvey1 & """) or "
End If
If Not IsNull(Me.cboSurvey1) Then
strWhere = strWhere & "([surveyor_2] = """ & Me.cboSurvey1 & """) AND "
End If
If Not IsNull(Me.txtstartdate) Then
strWhere = strWhere & "([Survey_Start] >= " & Format(Me.txtstartdate, conJetDate) & ") AND "
End If
If Not IsNull(Me.txtenddate) Then
strWhere = strWhere & "([Survey_Start] >= " & Format(Me.txtenddate, conJetDate) & ") AND "
End If
Comment