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

CBO rowsource query - instead of "=" need "contains"? 2

Status
Not open for further replies.

straybullet

IS-IT--Management
Jun 5, 2003
593
US
SELECT [products].[cadb_id], [Products].[ID_NUM], [Products].[ITEM_TYPE], [Products].[zone], [Products].[DESCRIPTION], [Products].[SECT] FROM Products WHERE [Products].[Item_Type]='*&"Exterior Doors"&*' ORDER BY [Products].[Description];

Basically, need the cbo to display Item_Type based on the existence of the words "Exterior Doors" as part of the whole.
Examples:
Steel Exterior Doors
Paintable Exterior Doors
Stainable Exterior Doors w/2 SideLights

Have tried so far:
'*&"Exterior Doors"&*'
"*Exterior Doors*"
"*&Exterior Doors&*"
'*"Exterior Doors"*'
"*&'Exterior Doors'&*"

Not sure what Im missing...

Thanks in advance!

Let them hate - so long as they fear... Lucius Accius
 
Code:
Like "*" & "Exterior Doors" & "*"

________________________________________________________
Zameer Abdulla
Help to find Missing people
There’s a world of difference between editorials and advertorials
 
Like '*Exterior Doors*'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
TYVM.. I was just popping back to ask that my post be ignored lol - Realized I could "create" the query in design view and view the SQL. The "Like" part was the magic ingredient! Need more coffee...

Let them hate - so long as they fear... Lucius Accius
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top