I have a created a macro that should filter based on a keyword in the control "mot clés" from the table "Banque Jurisprudence Transport". The code is as follows:
Function FilterKeyword()
On Error GoTo FilterKeyword_Err
DoCmd.ApplyFilter "[Banque Jurisprudence Transport]![MOTS CLÉS]", "[contains]", ""
FilterKeyword_Exit:
Exit Function
FilterKeyword_Err:
MsgBox Error$
Resume FilterKeyword_Exit
End Function
I do get a dialog box with the word contains that lets me enter the keyword I am looking for, however, although the record selector shows the form as being filtered, it is not since I know that there are 5 instances but the record selector shows 72 which is all the records.
Basically, I am trying to create a macro that would reproduce the following steps:
- click in the control "mot clés" (French version of keyword)
- Filter
- Text filters
- Contains...
- I then get a box entitled Custom Filter with the title MOTS CLÉS contains letting me enter the keyword I am looking for
Any help would be greatly appreciated
Thank you
Jeannie