G
Gnerks
I have a table in which the records are listed in the following format:
1MRS/Civil Engineering/Training Manager
2MRS/Operations/Advanced Training and Learning Center
I have a form with a list box that lists all of the Project Names from by
Access data table. We are using Access 2007.
I have a text box to filter through the names in the list box and want to
use it for user input to select only those records that CONTAIN the word
training (or whatever the user enters).
My code for the text box is
Private Sub txtLookup_Change()
'Used to quickly lookup a study
Dim strCriteria As String
Dim sSQL As String
strCriteria = Nz(Me.txtLookup.Text, "") & "*"
sSQL = "SELECT tblREPORTfields.*" _
& " from tblREPORTfields" _
& " WHERE (((tblREPORTfields.SELECTED)=False)" _
& " And ((tblREPORTfields.[PROJECT TITLE]) Like " & Chr(34) &
strCriteria & Chr(34) & "));"
Me.lstProjects.RowSource = sSQL
Me.lstProjects.Requery
End Sub
How do i change this code in order to select only those studies that have
the word the user entered in them?
1MRS/Civil Engineering/Training Manager
2MRS/Operations/Advanced Training and Learning Center
I have a form with a list box that lists all of the Project Names from by
Access data table. We are using Access 2007.
I have a text box to filter through the names in the list box and want to
use it for user input to select only those records that CONTAIN the word
training (or whatever the user enters).
My code for the text box is
Private Sub txtLookup_Change()
'Used to quickly lookup a study
Dim strCriteria As String
Dim sSQL As String
strCriteria = Nz(Me.txtLookup.Text, "") & "*"
sSQL = "SELECT tblREPORTfields.*" _
& " from tblREPORTfields" _
& " WHERE (((tblREPORTfields.SELECTED)=False)" _
& " And ((tblREPORTfields.[PROJECT TITLE]) Like " & Chr(34) &
strCriteria & Chr(34) & "));"
Me.lstProjects.RowSource = sSQL
Me.lstProjects.Requery
End Sub
How do i change this code in order to select only those studies that have
the word the user entered in them?