Need to filter for specific words in a field

W

watchtower54

Hello all,

I've been given a database that has almost 800,000 records (I know, YIKES!)
but my customer is asking me to filter out those records by looking for
records with specific words in one of the fields.

I feel like an idiot for asking this, but what's the way to go about doing
this again?
 
K

KARL DEWEY

to filter out those records by looking for records with specific words in
one of the fields.
What is your interpertation of 'filter out' mean? To pull records
containing the words or not to pull?

To pull, and is a short list of words, create select query and type the
words in the criteria row of the query design view grid below the field name.


If it is a very long list then put them in a separate table. In design view
add the word list table in the space above the grid. Click on the word field
and drag to the Field row of the grid. Copy the field name and paste into
the criteria row and edit to look like this --
Like "*" & [WordFieldName] & "*"

Post back if this not do it for you or more explaination is needed.
 
F

fredg

Hello all,

I've been given a database that has almost 800,000 records (I know, YIKES!)
but my customer is asking me to filter out those records by looking for
records with specific words in one of the fields.

I feel like an idiot for asking this, but what's the way to go about doing
this again?


Does the field contain just exactly the one word to be searched for,
i.e. "Toaster"?
Does the field in the record contain many words, of which one might be
the word to be searched for, i.e. "The toaster is broken."?
Does the field contain just one word but the user will wish to search
for more than one item in that field, i.e. search for "Toaster" or
"Knife"?

For example, to search a text field of many sentences and return just
the records that contain the word "toaster" in it....
Create a query:
Select TableName.* from Table Name where TableName.[FieldName] Like
"*" & [Enter the word] & "*"

The user will be prompted to enter the word (or phrase) to be searched
for. Enter toaster and only records that contain that word in the
search field will be returned.

A specific example would have been useful.
 
W

watchtower54

Hey Fred,

My apologies on the lack of information. The words she wants to look for are
in a field with many words.

For example, she wants me to search through a filter out records that have
words like "management" in a field containing business names such as "Fred's
Office Management Depot". That way she can isolate and focus on a small group
of records.

Karl,

I will try out your solution as soon as I can, I'll let you know how it
turns out.

fredg said:
Hello all,

I've been given a database that has almost 800,000 records (I know, YIKES!)
but my customer is asking me to filter out those records by looking for
records with specific words in one of the fields.

I feel like an idiot for asking this, but what's the way to go about doing
this again?


Does the field contain just exactly the one word to be searched for,
i.e. "Toaster"?
Does the field in the record contain many words, of which one might be
the word to be searched for, i.e. "The toaster is broken."?
Does the field contain just one word but the user will wish to search
for more than one item in that field, i.e. search for "Toaster" or
"Knife"?

For example, to search a text field of many sentences and return just
the records that contain the word "toaster" in it....
Create a query:
Select TableName.* from Table Name where TableName.[FieldName] Like
"*" & [Enter the word] & "*"

The user will be prompted to enter the word (or phrase) to be searched
for. Enter toaster and only records that contain that word in the
search field will be returned.

A specific example would have been useful.
 
F

fredg

Hey Fred,

My apologies on the lack of information. The words she wants to look for are
in a field with many words.

For example, she wants me to search through a filter out records that have
words like "management" in a field containing business names such as "Fred's
Office Management Depot". That way she can isolate and focus on a small group
of records.

Karl,

I will try out your solution as soon as I can, I'll let you know how it
turns out.

fredg said:
Hello all,

I've been given a database that has almost 800,000 records (I know, YIKES!)
but my customer is asking me to filter out those records by looking for
records with specific words in one of the fields.

I feel like an idiot for asking this, but what's the way to go about doing
this again?

Does the field contain just exactly the one word to be searched for,
i.e. "Toaster"?
Does the field in the record contain many words, of which one might be
the word to be searched for, i.e. "The toaster is broken."?
Does the field contain just one word but the user will wish to search
for more than one item in that field, i.e. search for "Toaster" or
"Knife"?

For example, to search a text field of many sentences and return just
the records that contain the word "toaster" in it....
Create a query:
Select TableName.* from Table Name where TableName.[FieldName] Like
"*" & [Enter the word] & "*"

The user will be prompted to enter the word (or phrase) to be searched
for. Enter toaster and only records that contain that word in the
search field will be returned.

A specific example would have been useful.

Select TableName.* from Table Name Where YourTable.[NameField] Like
"*" & [Enter the word] & "*"

Change YourTable and [NameField] to whatever the actual Table and
Field name is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top