Hi,
I want to filter a form based on 2 keyword. It wordks for the first keyword (see code), but how do i get this worked for the second one?
The user selects the keyword from an automatic list in the form. But sometimes keyword A will be selected as second one because it's less important then the first keyword. So by filtering on keyword A i want to filter record 1, 2 and 4.
Record Keyword1 Keyword2
1 A B
2 A C
3 B D
4 B A
I want to filter a form based on 2 keyword. It wordks for the first keyword (see code), but how do i get this worked for the second one?
The user selects the keyword from an automatic list in the form. But sometimes keyword A will be selected as second one because it's less important then the first keyword. So by filtering on keyword A i want to filter record 1, 2 and 4.
Record Keyword1 Keyword2
1 A B
2 A C
3 B D
4 B A
Code:
Private Sub Selection_open_Click()
On Error GoTo Err_Selection_open_Click
If Not Me.List_keywords & "" = "" Then
DoCmd.OpenForm "F_Fillinform", , , "[Keyword1]='" & Me.List_keywords & "'"
Else
DoCmd.OpenForm "F_Fillinform"
End If
End If
Exit Sub
Err_Selection_open_Click:
MsgBox Err.Description
End Sub