Query Referencing A Field In Form (LIKE)

abbaddon223

Registered User.
Local time
Today, 15:43
Joined
Mar 13, 2010
Messages
162
Hi all,

Hoping there's a master out there please.... :)

I have a form with a combo box in it which accepts multiple values.

I want to use a select query to pull records through from a table where one or all of the words in the table field match one or all of the words in the combo box.

So: Combo Box is called: SkillLookup (the form is "Frm_Search)

The field in the table is called: "Skills" (in table: "Tb_Candidate")

The syntax I'm using in the query is

Like [Forms]![Frm_Search]![SkillLookup]

the above is in the "Skills" field in the query.

It currently returns nothing :mad:

Thanks in advance for any help!!
 
Try:
Code:
Like '*' & [Forms]![Frm_Search]![SkillLookup] & '*'

The * wildcard at the beginning & end means that it looks for anything containing the value of SkillLookup, a wildcard just at the beginning would find anything ending in the value of the control and just one at the end would find all records with the value at the start of the field.
 
Mate - you're a legened!!! thanks ever so much!!!
 
No ptroblem.

Note, this kind of wildcard won't work with things like dates, it's for strings really (text fields).
 

Users who are viewing this thread

Back
Top Bottom