Home  |   French  |   About  |   Search  | mvps.org  

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

In Memoriam

Terms of Use


VB Petition

General: Use LIKE in queries and code

Author(s)
Dev Ashish

Within queries

  LIKE [Parameter] & "*"

or

  LIKE "*" & [Parameter] & "*"

 

From code:

  strTmp = Forms!FormName!Control
   strSQL="SELECT * from Employees WHERE LastName Like '*" & strTmp & "*'"

or

  strSQL = "SELECT * from Employees WHERE LastName Like '" & strTmp & "*'"


© 1998-2010, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer