I have a search box and it looks up project id number.
the orginal code works but filters anything with that particular number.
I like to adjust the filter to equal to the number enter.
ex,, I enter 22 , i get records with 622, 223, etc
I want it to be only 22
I can't seem to figure this out.. here's te code
Private Sub txtSearchString_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
LSearchString = txtSearchString
'Filter results based on search string
LSQL = "select * from [Projects - Active]"
LSQL = LSQL & " where ID LIKE '*" & LSearchString & "*'"
Form_frmSearch_sub.RecordSource = LSQL
lblTitle.Caption = "Project ID: Filtered by '" & LSearchString & "'"
'Clear search string
txtSearchString = ""
End Sub
the orginal code works but filters anything with that particular number.
I like to adjust the filter to equal to the number enter.
ex,, I enter 22 , i get records with 622, 223, etc
I want it to be only 22
I can't seem to figure this out.. here's te code
Private Sub txtSearchString_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
LSearchString = txtSearchString
'Filter results based on search string
LSQL = "select * from [Projects - Active]"
LSQL = LSQL & " where ID LIKE '*" & LSearchString & "*'"
Form_frmSearch_sub.RecordSource = LSQL
lblTitle.Caption = "Project ID: Filtered by '" & LSearchString & "'"
'Clear search string
txtSearchString = ""
End Sub