G
Guest
I have a list box which returns a pretty lengthy list of query results. I'd
like users to be able to narrow the list by entering the first few characters
in a text box. I've set up the text box with the following code
Private Sub Listfilter_Change()
On Error GoTo ErrHandler
Me.lstTRS.RowSource = "SELECT qryTRS.STR, qryTRS.[T-R-S]" _
& " FROM qryTRS WHERE (((qryTRS.[T-R-S]) Like " & Me.Listfilter.Value &
"*))" _
& " ORDER BY qryTRS.[T-R-S];"
Me.lstTRS.Requery
Exit Sub
....
It runs and clears the list but doesn't return results. I don't get an error
either, so I suspect I've just misused the syntax for the wild card. Or is
there an entirely different method I should be using.
Thanks for your help!
like users to be able to narrow the list by entering the first few characters
in a text box. I've set up the text box with the following code
Private Sub Listfilter_Change()
On Error GoTo ErrHandler
Me.lstTRS.RowSource = "SELECT qryTRS.STR, qryTRS.[T-R-S]" _
& " FROM qryTRS WHERE (((qryTRS.[T-R-S]) Like " & Me.Listfilter.Value &
"*))" _
& " ORDER BY qryTRS.[T-R-S];"
Me.lstTRS.Requery
Exit Sub
....
It runs and clears the list but doesn't return results. I don't get an error
either, so I suspect I've just misused the syntax for the wild card. Or is
there an entirely different method I should be using.
Thanks for your help!