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 / General 2 / February 2007

Tip: Looking for answers? Try searching our database.

Create a query to search for ****** in text not wildcard

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kay - 27 Feb 2007 14:58 GMT
Hi
I am trying to create a query that searches a field for specifically
*******, not wildcard
I am running Access2000
Thanks
Andrea - 27 Feb 2007 16:17 GMT
Are you specifically searching for 7 characters or would you just like for
the query to pick up the keyword you enter into the field?

If it is the latter, you can use the following:

Like "*" & [forms]![FormNamehere]![FieldValueNameHere] & "*"
Signature

Andrea

> Hi
> I am trying to create a query that searches a field for specifically
> *******, not wildcard
> I am running Access2000
> Thanks
John W. Vinson - 27 Feb 2007 17:51 GMT
>Hi
>I am trying to create a query that searches a field for specifically
>*******, not wildcard
>I am running Access2000
>Thanks

The LIKE operator uses wildcards such as *; the = operator does not.

If you're searching for seven asterisks as the actual content of the
field simply use that as a criterion:

"*******"

on the Criteria line. In SQL it would be

WHERE ([fieldname] = "*******")

            John W. Vinson [MVP]
Ken Sheridan - 27 Feb 2007 18:04 GMT
Do you mean where the field contains a literal string of seven asterisks?

If so and the string is the complete value in the field then simply use the
equality operator:

SELECT *
FROM [MyTable]
WHERE [MyField] = "*******";

If the seven asterisks are a substring within the field then use the INSTR
function:

SELECT *
FROM [MyTable]
WHERE INSTR([MyField],"*******") > 0;

Ken Sheridan
Stafford, England

> Hi
> I am trying to create a query that searches a field for specifically
> *******, not wildcard
> I am running Access2000
> Thanks
 
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.