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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Acknowledge an asterisk as a string



 
 
Thread Tools Display Modes
  #1  
Old June 1st, 2010, 04:15 AM posted to microsoft.public.access
kidkosmo
external usenet poster
 
Posts: 42
Default Acknowledge an asterisk as a string

Hi, All,

Is there a way to have Access acknowledge an asterisk as a string
value rather than a wildcard? I would like to add validation to a
field that will not allow and asterisk to be added as part of that
field; however, the validation appears to recognize that value as a
wildcard and does not allow any value to be entered.

Thoughts, ideas?

Thanks!
  #2  
Old June 1st, 2010, 05:05 AM posted to microsoft.public.access
James A. Fortune
external usenet poster
 
Posts: 903
Default Acknowledge an asterisk as a string

On May 31, 11:15*pm, kidkosmo wrote:
Hi, All,

Is there a way to have Access acknowledge an asterisk as a string
value rather than a wildcard? *I would like to add validation to a
field that will not allow and asterisk to be added as part of that
field; however, the validation appears to recognize that value as a
wildcard and does not allow any value to be entered.

Thoughts, ideas?

Thanks!


Try:

SELECT * FROM MyTable WHERE FieldName LIKE "*[*]*";

to return records from MyTable where FieldName contains an asterisk.
Maybe NOT LIKE "*[*]*" will give the opposite.

James A. Fortune

  #3  
Old June 1st, 2010, 11:16 AM posted to microsoft.public.access
david
external usenet poster
 
Posts: 398
Default Acknowledge an asterisk as a string

Or, if you want that as a validation rule,

LIKE "fred[*]nurk"

applied to a textbox or table, that only accepts
fred*nurk

(david)

"James A. Fortune" wrote in message
...
On May 31, 11:15 pm, kidkosmo wrote:
Hi, All,

Is there a way to have Access acknowledge an asterisk as a string
value rather than a wildcard? I would like to add validation to a
field that will not allow and asterisk to be added as part of that
field; however, the validation appears to recognize that value as a
wildcard and does not allow any value to be entered.

Thoughts, ideas?

Thanks!


Try:

SELECT * FROM MyTable WHERE FieldName LIKE "*[*]*";

to return records from MyTable where FieldName contains an asterisk.
Maybe NOT LIKE "*[*]*" will give the opposite.

James A. Fortune



  #4  
Old June 1st, 2010, 02:55 PM posted to microsoft.public.access
John Spencer
external usenet poster
 
Posts: 7,815
Default Acknowledge an asterisk as a string

If you just want to eliminate asterisks then the validation rule could be
Like "*[!*]*"
Or
NOT Like "*[*]*"
John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

david wrote:
Or, if you want that as a validation rule,

LIKE "fred[*]nurk"

applied to a textbox or table, that only accepts
fred*nurk

(david)

"James A. Fortune" wrote in message
...
On May 31, 11:15 pm, kidkosmo wrote:
Hi, All,

Is there a way to have Access acknowledge an asterisk as a string
value rather than a wildcard? I would like to add validation to a
field that will not allow and asterisk to be added as part of that
field; however, the validation appears to recognize that value as a
wildcard and does not allow any value to be entered.

Thoughts, ideas?

Thanks!


Try:

SELECT * FROM MyTable WHERE FieldName LIKE "*[*]*";

to return records from MyTable where FieldName contains an asterisk.
Maybe NOT LIKE "*[*]*" will give the opposite.

James A. Fortune



 




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


All times are GMT +1. The time now is 11:29 PM.


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