A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I search for an asterick?



 
 
Thread Tools Display Modes
  #1  
Old January 13th, 2006, 05:28 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default How do I search for an asterick?

I am trying to search for a literal asterick using a Query. Access assumes
that I am using the asterick as a wildcard charactor and returns everything.
What is the correct delimiter so that I can find the asterick?
  #2  
Old January 13th, 2006, 06:06 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default How do I search for an asterick?

Try looking for Chr(42), which is the asterisk.

HTH

brett wrote:
I am trying to search for a literal asterick using a Query. Access assumes
that I am using the asterick as a wildcard charactor and returns everything.
What is the correct delimiter so that I can find the asterick?


--
Sam

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200601/1
  #3  
Old January 13th, 2006, 07:57 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default How do I search for an asterick?

Assuming that the asterisk is embedded in a string

Criteria: LIKE "*[*]*"

If the asterisk is not in a string but is the entire string
Criteria: = "*"

When you need to search for wildcard characters using LIKE you can have them
taken as literals by enclosing them in [].

"brett" wrote in message
...
I am trying to search for a literal asterick using a Query. Access assumes
that I am using the asterick as a wildcard charactor and returns
everything.
What is the correct delimiter so that I can find the asterick?



  #4  
Old January 13th, 2006, 09:02 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default How do I search for an asterick?

On Fri, 13 Jan 2006 09:28:02 -0800, "brett"
wrote:

I am trying to search for a literal asterick using a Query. Access assumes
that I am using the asterick as a wildcard charactor and returns everything.
What is the correct delimiter so that I can find the asterick?


Bracket it in [Square brackets]: a criterion of

LIKE "*[*]*"

will find each record containing an asterisk anywhere within the text
field.

To find records where the field contains just a single asterisk,
nothing else, you can skip using the LIKE operator (which sees * as a
wildcard) and just use the = operator (which treats it as just another
character); a criterion of

"*"

will work in that instance.

John W. Vinson[MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature request - better search abilities Boe General Discussion 19 November 29th, 2005 02:33 PM
Help performing a search Someone General Discussion 14 November 21st, 2005 10:22 AM
Visible Property Ben General Discussion 4 September 14th, 2005 08:22 PM
search more than 1 fields spacerocket Using Forms 3 August 28th, 2005 08:00 AM
Search fields in form spacerocket Using Forms 0 August 25th, 2005 10:25 AM


All times are GMT +1. The time now is 09:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.