lifeson
03-23-2009, 05:07 AM
Is it possible to filter a ADODB recordset on more than 1 field at a time?
e.g
If cGroup = vbNullString Then
'MsgBox "No filter applied"
Else
If cType = vbNullString Then
rst.Filter = "ComponentGroupID = '" & cGroup & "'"
Else
' I have tried a few variations of this but got nowhere
rst.Filter = "ComponentTypeID = '" & cType & "' AND ComponentGroupID = '" & cGroup & "'"""
End If
End If
e.g
If cGroup = vbNullString Then
'MsgBox "No filter applied"
Else
If cType = vbNullString Then
rst.Filter = "ComponentGroupID = '" & cGroup & "'"
Else
' I have tried a few variations of this but got nowhere
rst.Filter = "ComponentTypeID = '" & cType & "' AND ComponentGroupID = '" & cGroup & "'"""
End If
End If