I am working on form with a combo box. The combo box contains the field names in which the user would want to search.
I have the code passing the correct data, but I can't seem to get the syntax of the WHERE clause in the DoCmd.OpenForm correct, when the the string is at the beginning of the clause:
Private Sub SearchButton_Click()
Dim strCriteria As String
strCriteria = InputBox("Enter Equipment Name")
Dim SearchField As String
SearchField = Me!cmbFieldName
DoCmd.OpenForm "frmInventory", , , "SearchField Like '*" & strCriteria & "*'"
Thanks in advance.