Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL query with a wildcard 1

Status
Not open for further replies.

scotttom

IS-IT--Management
Mar 5, 2002
143
US
I need a bit of help with a SQL query that I'm running through VBA. I have a table that has strings of various length (asd, asdf, qwerty) in column tbl.ProjectPrefix.

What I'm looking to get is the value of tbl.Text if the value in a text box starts with any of the values in tbl.ProjectPrefix.

SO if I type "asdfg" I want to see the tbl.Text values for both the "asd" and the "asdf".

Code:
SELECT tbl.Text From tbl WHERE  ((("asdfg") Like (tbl.ProjectPrefix*)))

I keep getting syntax errors or extra ( errors and I'm stumped.

Can anyone see my error?

Thanks in advance for any assistance.

Scott
 
Like (tbl.ProjectPrefix & '*')

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top