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

selecting records that INCLUDE a string

Status
Not open for further replies.

Compuboy

Programmer
Jun 8, 2004
38
0
0
US
My DB is in Access 2002.
If I want to select records to a listbox that match a string EXACTLY it works when I use:

SELECT [CORD Data Table2].[Cord Number] WHERE [CORD Data Table2].[CE Number] = Forms![cord data form]!CEsearchtext

All items with that CE number will appear in the list box.
However, I want to make it possible for items to appear in the list box if the string matches the beginning or ALL of the CE Number.

For example: If I have item A w/ CE Number: 111, Item B w/ CE # 110, Item C w/ CE # 100.

I want it so if the searched string is just "11"...both item A and B will appear. If it is just "1" then all three items should appear.
What should I type in for Row Source??? THaNKS
 
SELECT [CORD Data Table2].[Cord Number] WHERE [CORD Data Table2].[CE Number] Like (Forms![cord data form]!CEsearchtext & "*")

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top