Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
YesGrumpy - 18 Jul 2006 21:15 GMT
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?
KARL DEWEY - 18 Jul 2006 21:55 GMT
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?
YesGrumpy - 18 Jul 2006 21:59 GMT
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?
KARL DEWEY - 18 Jul 2006 23:03 GMT
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.

> 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
[quoted text clipped - 7 lines]
> > > "query" this field - I've searched all types of parameters, but logical or
> > > mathematical are not going to work.  Am I out of luck?
YesGrumpy - 19 Jul 2006 13:25 GMT
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.

> This should do it --
> SELECT YourTable.*
[quoted text clipped - 16 lines]
> > > > "query" this field - I've searched all types of parameters, but logical or
> > > > mathematical are not going to work.  Am I out of luck?
KARL DEWEY - 19 Jul 2006 15:57 GMT
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.

> 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
[quoted text clipped - 22 lines]
> > > > > "query" this field - I've searched all types of parameters, but logical or
> > > > > mathematical are not going to work.  Am I out of luck?
Marshall Barton - 18 Jul 2006 22:29 GMT
>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 & "*"

Signature

Marsh
MVP [MS Access]

YesGrumpy - 19 Jul 2006 13:32 GMT
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.

> >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
[quoted text clipped - 12 lines]
> FROM maintable INNER JOIN Words
>     ON maintable.textfield LIKE "*" & Words.Keyword & "*"
Marshall Barton - 20 Jul 2006 05:55 GMT
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]
& "*"
Signature

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
[quoted text clipped - 19 lines]
>> FROM maintable INNER JOIN Words
>>     ON maintable.textfield LIKE "*" & Words.Keyword & "*"
YesGrumpy - 20 Jul 2006 13:38 GMT
Thanks to both you and Karl - it worked!

Denise

> 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
[quoted text clipped - 32 lines]
> >> FROM maintable INNER JOIN Words
> >>     ON maintable.textfield LIKE "*" & Words.Keyword & "*"
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.