obulldog27
Programmer
what is the syntax if I want to substitute ChemicalName in the query for a textbox so that user can define his own search field.
Code:
Private Sub Command1_Click()
SearchCriteria = find_box.Text
If SearchCriteria = "" Then
MsgBox "Enter a Criteria"
Else
With compchartado
.RecordSource = "SELECT * FROM Comp_Chart WHERE ChemicalName like '" & SearchCriteria & "%'"
.Refresh
End With
End If
End Sub