Create Search with SQL Statement in Microsoft Access
- Create a Form as Tabular
- Form Tab, New, AutoForm : Tabular, select the table that you want to create as Form, OK button
- In Toolbox Control click on Text box and drag on Form
- click right mouse on text box choose properties
- All Tab, Name: txtName
- Event Tab, Evnet After Update click arrow choose [Event Procedure]
Private Sub txtName_AfterUpdate()
Dim search As String
'Name Like [txtname] & "*"
search = "[Name] Like" & "'" & txtName & "*'"
Form_frm_ResearchbyName.FilterOn = True
Form_frm_ResearchbyName.Filter = search
End Sub