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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems firing LIKE Queries in Access 1

Status
Not open for further replies.

MarkRuse

Programmer
Aug 11, 1999
29
0
0
GB
Help,<br>
<br>
I have a problem firing a SELECT Query with a Like clause in it at an Access 97 Database. ie 'SELECT Name FROM Customer WHERE Name Like '*BOB*'.<br>
<br>
If I fire the SQL in the Database window it works fine, but when I Attempt to <br>
<br>
.Open SQL , Connection ,1 ,1<br>
<br>
It comes back with an error message saying that it doesn't like the like clause (ha ha)<br>
<br>
Can anybody help me with this ?<br>
<br>
Also does anybody know how to pass in Parameters to an Access Query fired from VBScript. I have tried many different combinations, and nothing seems to work.<br>

 
Check your wildcard symbol. Using VBScript, the wildcard symbol for LIKE is the percent sign (%),...use that instead of the asterisk and it should work...
 
Thanks BillWebboy, worked like a treat. I think I got confused because Access only likes using the * as a wildcard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top