Db-why-not
Registered User.
- Local time
- Yesterday, 21:20
- Joined
- Sep 17, 2019
- Messages
- 159
I have 2 textboxes txtkeywords and txtkeywords2 that I am want to use to do keyword searchs.I cant get the code to work.
What do I need to do to fix the code?
Or How can I use 1 textbox that would let me type in multiple keywords?
Thanks.
Code:
Private Sub cmdsearch_Click()
Dim SQL As String
SQL = "SELECT q_Qual_Cond.[Chron#], q_Qual_Cond.[Research_ID], q_Qual_Cond.[Qualifying_Condition] " _
& "FROM q_Qual_Cond " _ & "Where [Qualifying_Condition] Like '*" & Me.txtkeywords & "*' " _
& "ORDER BY q_Qual_Cond.[Chron#], q_Qual_Cond.[Research_ID]; "
Dim SEQL As String
SEQL = "SELECT q_Qual_Cond.[Chron#], q_Qual_Cond.[Research_ID], q_Qual_Cond.[Qualifying_Condition] " _
& "FROM q_Qual_Cond " _
& "Where [Qualifying_Condition] Like '*" & Me.txtkeywords2 & "*' " _
& "ORDER BY q_Qual_Cond.[Chron#], q_Qual_Cond.[Research_ID]; "
Me.sub_Qual_cond.Form.RecordSource = SQL Or SEQL
Me.sub_Qual_cond.Form.Requery
End Sub
What do I need to do to fix the code?
Or How can I use 1 textbox that would let me type in multiple keywords?
Thanks.
Last edited by a moderator: