Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Query Search for text string - Syntax Help

$
0
0
Hi,

I'm trying to make an error checker within my database. Each record can have anywhere between 0 and 42 errors (all combinations). So I have a separate form where the user picks the type they are looking for, and doing so populates a locked Textbox [training needs]. The user then clicks the button which launches a query. The intention is- search through the database to find all results containing that error.

I've tried the following query however this works however it only returns EXACT results. i.e. If i pick "Clarity" it will only show results where Clarity was the only error - it will not show results where there were Clarity + Anything else:

SELECT [FTP Marking Sheet_Q].[Date of Recorded Call], [FTP Marking Sheet_Q].Advisor, [FTP Marking Sheet_Q].Score, [FTP Marking Sheet_Q].[Training Needs], [FTP Marking Sheet_Q].[Order Result], [FTP Marking Sheet_Q].[Add-On Result], [FTP Marking Sheet_Q].[Customer Experience Result]
FROM [FTP Marking Sheet_Q]
WHERE ((([FTP Marking Sheet_Q].[Training Needs]) Like [Forms]![ErrorFinder]![Training Needs]));


Just as a test I tried to manually type in the string into the query and doing this gave me the full desired results Clarity + Anything Else:

SELECT [FTP Marking Sheet_Q].[Date of Recorded Call], [FTP Marking Sheet_Q].Advisor, [FTP Marking Sheet_Q].Score, [FTP Marking Sheet_Q].[Training Needs], [FTP Marking Sheet_Q].[Order Result], [FTP Marking Sheet_Q].[Add-On Result], [FTP Marking Sheet_Q].[Customer Experience Result]
FROM [FTP Marking Sheet_Q]
WHERE ((([FTP Marking Sheet_Q].[Training Needs]) Like "*Clarity,*"));

- i can't use this however because i need it to be more dynamic

So my question is, how can I amend this line so that it show's the full results:
WHERE ((([FTP Marking Sheet_Q].[Training Needs]) Like [Forms]![ErrorFinder]![Training Needs]));

I've already tried:
Like "*[Forms]![ErrorFinder]![Training Needs]*"
but that actually shows nothing at all, so i'm obviously doing something wrong :S

Viewing all articles
Browse latest Browse all 13329

Trending Articles