I need to query a field with various "words" in Access can I?

G

Guest

I have a field which has a description of a file - I need to be able to
"query" this field - I've searched all types of parameters, but logical or
mathematical are not going to work. Am I out of luck?
 
G

Guest

I do not understand your problem. Give an example of the data that you would
be searching for.
 
G

Guest

For instance, I have a field of a box number where a file is located, I then
have a description of that file (i.e., Sam Jones v. Ima Good Sample). I need
to be able to "query" that description field. Such as searching for the
particular file in a particular box out of 25,000 entries. Impossible?
 
M

Marshall Barton

YesGrumpy said:
I have a field which has a description of a file - I need to be able to
"query" this field - I've searched all types of parameters, but logical or
mathematical are not going to work. Am I out of luck?

Can't tell without knowing in more detail what you mean by
"query" this field.

If you have a Words table with a column for the keywords you
want to match somewhere in a text field in the main table
(if you'd tell the ral names of your objects, we wouldn't be
speaking in such general terms), then you could use
something like:

SELECT DISTINCT maintable.*
FROM maintable INNER JOIN Words
ON maintable.textfield LIKE "*" & Words.Keyword & "*"
 
G

Guest

This should do it --
SELECT YourTable.*
FROM YourTable
WHERE (((YourTable.description) Like "*" & [Enter first party name] & "*"
And (YourTable.description) Like "*" & [Enter second party name] & "*"));

If you enter one party and just press ENTER when prompted for the second it
will pull all records with the first party.
 
G

Guest

The problem with this is that we would have to know the first and last party
name - it may be just a string of information - I probably am asking for too
much. But a thought came to me, is there a way to relate a report in a query?

Thanks so much for your help.

KARL DEWEY said:
This should do it --
SELECT YourTable.*
FROM YourTable
WHERE (((YourTable.description) Like "*" & [Enter first party name] & "*"
And (YourTable.description) Like "*" & [Enter second party name] & "*"));

If you enter one party and just press ENTER when prompted for the second it
will pull all records with the first party.

YesGrumpy said:
For instance, I have a field of a box number where a file is located, I then
have a description of that file (i.e., Sam Jones v. Ima Good Sample). I need
to be able to "query" that description field. Such as searching for the
particular file in a particular box out of 25,000 entries. Impossible?
 
G

Guest

I know I am asking too much, but my field may contain words like "United
States v. John (Mary) Smith" so if I wanted to "search" or "query" is there a
way to search a field randomly. I guess I should further explain - I want to
set the query up to ask the question 'enter file information' and the query
go and search the file field and pull up just those entries that have the
information entered.
 
G

Guest

You do not have to enter the party's name but ANY data that you know. If
you enter both the first and second the record must contain both. If you only
enter one and just press ENTER when prompted for the second it will pull data
that has the first entry.

YesGrumpy said:
The problem with this is that we would have to know the first and last party
name - it may be just a string of information - I probably am asking for too
much. But a thought came to me, is there a way to relate a report in a query?

Thanks so much for your help.

KARL DEWEY said:
This should do it --
SELECT YourTable.*
FROM YourTable
WHERE (((YourTable.description) Like "*" & [Enter first party name] & "*"
And (YourTable.description) Like "*" & [Enter second party name] & "*"));

If you enter one party and just press ENTER when prompted for the second it
will pull all records with the first party.

YesGrumpy said:
For instance, I have a field of a box number where a file is located, I then
have a description of that file (i.e., Sam Jones v. Ima Good Sample). I need
to be able to "query" that description field. Such as searching for the
particular file in a particular box out of 25,000 entries. Impossible?

:

I do not understand your problem. Give an example of the data that you would
be searching for.


:

I have a field which has a description of a file - I need to be able to
"query" this field - I've searched all types of parameters, but logical or
mathematical are not going to work. Am I out of luck?
 
M

Marshall Barton

Ahhh, I thought you had a whole list of things you wanted to
search for. If it's only one, you can use the same idea
that Karl posted.

Just set the field's criteria to something like this:
LIKE "*" & [Enter search string] & "*"

or use Karl's two name query, which would translate to in
the query design window:

LIKE "*" & [Enter name1] & "*" AND LIKE "*" & [Enter name2]
& "*"
 
G

Guest

Thanks to both you and Karl - it worked!

Denise

Marshall Barton said:
Ahhh, I thought you had a whole list of things you wanted to
search for. If it's only one, you can use the same idea
that Karl posted.

Just set the field's criteria to something like this:
LIKE "*" & [Enter search string] & "*"

or use Karl's two name query, which would translate to in
the query design window:

LIKE "*" & [Enter name1] & "*" AND LIKE "*" & [Enter name2]
& "*"
--
Marsh
MVP [MS Access]

I know I am asking too much, but my field may contain words like "United
States v. John (Mary) Smith" so if I wanted to "search" or "query" is there a
way to search a field randomly. I guess I should further explain - I want to
set the query up to ask the question 'enter file information' and the query
go and search the file field and pull up just those entries that have the
information entered.
 

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