Contains Search Help

lumpia

New member
Local time
Today, 14:49
Joined
Dec 2, 2009
Messages
2
Query Criteria from a form to perform a contains search help

I have a query that has a number of fields. I only want the contains type search in one of those fields. I'm using Access 2007, building in 2003 format. I have searched for about a week for how to do this, and can't seem to figure it out.

Here is the code which I'm using in the criteria for the query:

Like "*" & "[Forms]![Search]![Activity]" & "*"

I have also tried Like "*" & [Forms]![Search]![Activity] & "*"

From my understanding, this should do the function I desire, as it should allow for the search of a partial string, instead of having to type it exactly how it is in that field.

This field is a memo field in the parent table, as some of the entries of this field can have some length to them. I don't know if that would have anything to do with why it is not working.

If anyone is able to help me along, I would be very grateful.
 
Last edited:
Your first string pattern will not work. However, the second one seems correct. I would suggest take a copy of your main table, convert the memo to text field and see if it works.
Memo fields do behave peculiarly sometimes...
 
As a troubleshooting step, you could create a temporary text box on your form that contains your like clause. This will give you an idea as to whether you're on the right track or not.
 

Users who are viewing this thread

Back
Top Bottom