This is the correct way of doing it. The only problem was that you bound the search value to the recordset field instead of the form field. I made a mistake when I suggested the first correction which I apologize for. It is just a small tweak because you selected the wrong value when setting up the search.
If you attach a copy of the code or show me the line of code that is giving the error I can point out the problem and we can get it fixed.
If you want to delete the code an re-apply the search it would have worked properly if you bound the search value to the form field instead of the recordset field.