Hi,
I'm looking to add search functionality on form using a text box and button, attaching screenshot. I'm using DoCmd.SearchForRecord command for that and it works fine if I used it to search, but when I try to use '* Criteria *' wildcard it doesn't search as expected and stays on the same record. I think SearchForRecord is only considering * and not rest of the criteria. Is I'm using the correct syntax please?? i.e. DoCmd.SearchForRecord , , , "Job_Description LIKE * '" & Me.txtSearchCriteria & "' * "
Additionally it will be preferable that when search results on the form will be filtered as search results only. How could I achieve that please??
Thanks,
K
I'm looking to add search functionality on form using a text box and button, attaching screenshot. I'm using DoCmd.SearchForRecord command for that and it works fine if I used it to search, but when I try to use '* Criteria *' wildcard it doesn't search as expected and stays on the same record. I think SearchForRecord is only considering * and not rest of the criteria. Is I'm using the correct syntax please?? i.e. DoCmd.SearchForRecord , , , "Job_Description LIKE * '" & Me.txtSearchCriteria & "' * "
Additionally it will be preferable that when search results on the form will be filtered as search results only. How could I achieve that please??
Thanks,
K