Home  |  About  |   Search   

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

RunCommand Constants

Terms of Use


 

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-2009, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer