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 / April 2008

Tip: Looking for answers? Try searching our database.

criteria in query from form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
2Blessed4Stress - 17 Apr 2008 19:20 GMT
I have a query where I want to set the criteria on a text field to look for
the results in a field on my form.  The form[frm_WSearchData] field is called
description and has been formated to contain multiple words.
For example:  The description field reads: "*pump*" and like "*gear*"
In my qry, I want to search a text data field for the value above.  "*pump*"
and like "*gear*"
I have on the criteria line of my query:
[Forms]![frm_WSearchData]![Description]

When I hit run it ask to Enter Parameter Value.
What am I doing wrong?
KARL DEWEY - 17 Apr 2008 20:41 GMT
You did not say the name of the text field so I will call it TextField and
try this -
SELECT *
FROM [YourTableName]
WHERE [Forms]![frm_WSearchData]![Description] Like "*" &
[YourTableName].[TextField] & "*";

Signature

KARL DEWEY
Build a little - Test a little

> I have a query where I want to set the criteria on a text field to look for
> the results in a field on my form.  The form[frm_WSearchData] field is called
[quoted text clipped - 7 lines]
> When I hit run it ask to Enter Parameter Value.
> What am I doing wrong?
2Blessed4Stress - 17 Apr 2008 21:01 GMT
I think I need to give you some more information.  This is what I have in my
qry's sql:
SELECT *
FROM [SBS_Data]
WHERE [Forms]![frm_WSearchData]![Description] Like "*" &
[SBS_Data].[DESCRIPTION] & "*";

The table SBS_Data has a field name Description.  I want to find multiple
words in this field.  The user will enter the search words on a form.
(seperate txt boxes for each word up to 5).  From this form, I created
another qry that combines all words entered into another form
[frm_WSearchData] so together they look exactly like this:
"*pump*" and like "*gear*"
Am I doing too much or should I just leave all the words in their own
separate text boxes?

> You did not say the name of the text field so I will call it TextField and
> try this -
[quoted text clipped - 14 lines]
> > When I hit run it ask to Enter Parameter Value.
> > What am I doing wrong?
KARL DEWEY - 17 Apr 2008 21:58 GMT
With what I posted you would put all the search words in
[Forms]![frm_WSearchData]![Description], separated by spaces.  It would pull
all records that have a match to any and all words entered in the form.
Signature

KARL DEWEY
Build a little - Test a little

> I think I need to give you some more information.  This is what I have in my
> qry's sql:
[quoted text clipped - 30 lines]
> > > When I hit run it ask to Enter Parameter Value.
> > > What am I doing wrong?
2Blessed4Stress - 20 Apr 2008 19:55 GMT
I need to find the words wherever they are in the DESCRIPTION field, in any
order.  I run a qry that makes all the words look exactly like - "*word1*and
like *word2*" - Should I do something different?

> With what I posted you would put all the search words in
> [Forms]![frm_WSearchData]![Description], separated by spaces.  It would pull
[quoted text clipped - 34 lines]
> > > > When I hit run it ask to Enter Parameter Value.
> > > > What am I doing wrong?
 
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



©2009 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.