SQL Select LIKE

  • Thread starter Thread starter doodle
  • Start date Start date
D

doodle

greetings. happy friday the 13th.

access 97, windows xp

Right now this populates my listbox with everything that has a part
name that exactly matches what is in the text box. i need it to return
anything with a part name that contains what is in the text box. i know
i need to use LIKE but i can't get the syntax right.

Private Sub Command9_Click()

Dim strsql
strsql = "Select * from tblLookupParts"
strsql = strsql & " WHERE PartName='" & Me.txtSearch & "'"
Me.lstTSUSA_Search.RowSource = strsql


End Sub

-doodle
 
I think that's one of the nicest responses I ever got to a newsgroup post.
It's so cool to think that someone was able to go home because of something
I did! Slán Abhaile! (Safe Home!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top