Search by parts of keywords

  • Thread starter Thread starter Allen Browne
  • Start date Start date
A

Allen Browne

The Like operator can search for parts of words.

Simple example:
"[MyMemo] Like ""*arch*"""
where "MyMemo" represents the name of your memo field.

For the example you gave, you would need to generate a string like this and
apply it as the Filter for your form:
"([MyMemo] Like ""*arch*"") AND ([MyMemo] Like ""*act*"") AND ([MyMemo]
Like ""*200*"")"

If the user enters the words into one text box, use the Split() function to
parse the words into an array, and loop through the array from LBound to
UBound to build up the filter string.
 
Hi.

I'm a newbie to Access.

Is there any feature in Access (or any other database program) whereby I can
do a search by multiple parts of Keywords (upto 8) in a memo field.

For example, a search such as "arch act 200" would return a record
containing "retroactive 25/7/2004 archive" in the memo field.

I know that ACDSee (the photo album catalog program) can do this for
multiple keywords entered into the "Notes" field.

I'm a newbie to this program, so is there anywhere that I can get a blank
database containing these features, and which I could then edit to my
requirements ?

Many thanks

Mike

See Microsoft Knowledgebase article:
210530 "ACC2000: How to Create a Parameter In() Statement"
 
fredg said:
See Microsoft Knowledgebase article:
210530 "ACC2000: How to Create a Parameter In() Statement"


Sorry, Fred, but I don't see the relevance of that to the OP's question. He
wants to be able to find parts of various strings in a single field, not
find if a single field contains one of several values.
 
Hi.

I'm a newbie to Access.

Is there any feature in Access (or any other database program) whereby I can
do a search by multiple parts of Keywords (upto 8) in a memo field.

For example, a search such as "arch act 200" would return a record
containing "retroactive 25/7/2004 archive" in the memo field.

I know that ACDSee (the photo album catalog program) can do this for
multiple keywords entered into the "Notes" field.

I'm a newbie to this program, so is there anywhere that I can get a blank
database containing these features, and which I could then edit to my
requirements ?

Many thanks

Mike
 
Hi Allen. Thanks for your reply.

Just a bit of background. I've just started using Access, having worked with
databases (many) years ago. So getting back into the layout/design part of
it should pose no problem.

However, scripting is another kettle of fish, as it was very basic in those
days - dBase was what I was using then.

Is there any place that I could get a blank database containing the
scripting part of what I had mentioned ? I have been searching all over for
a few weeks without any luck.

Many thanks.

Mike


The Like operator can search for parts of words.

Simple example:
"[MyMemo] Like ""*arch*"""
where "MyMemo" represents the name of your memo field.

For the example you gave, you would need to generate a string like this and
apply it as the Filter for your form:
"([MyMemo] Like ""*arch*"") AND ([MyMemo] Like ""*act*"") AND ([MyMemo]
Like ""*200*"")"

If the user enters the words into one text box, use the Split() function to
parse the words into an array, and loop through the array from LBound to
UBound to build up the filter string.
 
Back
Top