I
idanovic
I think what I'm trying to do is very simple. I want to add a
seach/filter field to my main form to allow users to search for records
based on key words or word. I'm looking for something simple. I'm
pretty new to vba so please explain things out.
This is what I've come up with so far but I could be totally off track.
Text35 is the text box in my form (called MainForm). Project is both
the name of the table and the name of the field I'm trying to seach.
Any help would be really appreaciated! Thanks!
Private Sub Text35_AfterUpdate()
If Not IsNull(Me!Text35) Then
Me!MainForm.Form.Filter="[Project] Like '*"&me!Project&"*'"
Me!MainForm.Form.Filter = True
Else
Me!MainForm.Form.Filter = False
End If
End Sub
seach/filter field to my main form to allow users to search for records
based on key words or word. I'm looking for something simple. I'm
pretty new to vba so please explain things out.
This is what I've come up with so far but I could be totally off track.
Text35 is the text box in my form (called MainForm). Project is both
the name of the table and the name of the field I'm trying to seach.
Any help would be really appreaciated! Thanks!
Private Sub Text35_AfterUpdate()
If Not IsNull(Me!Text35) Then
Me!MainForm.Form.Filter="[Project] Like '*"&me!Project&"*'"
Me!MainForm.Form.Filter = True
Else
Me!MainForm.Form.Filter = False
End If
End Sub