PC Review


Reply
Thread Tools Rate Thread

Acknowledge an asterisk as a string

 
 
kidkosmo
Guest
Posts: n/a
 
      1st Jun 2010
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!
 
Reply With Quote
 
 
 
 
James A. Fortune
Guest
Posts: n/a
 
      1st Jun 2010
On May 31, 11:15*pm, kidkosmo <kidkos...@yahoo.com> 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
(E-Mail Removed)
 
Reply With Quote
 
david
Guest
Posts: n/a
 
      1st Jun 2010
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" <(E-Mail Removed)> wrote in message
news:9ae1c0f5-95c7-4aa5-b8ab-(E-Mail Removed)...
On May 31, 11:15 pm, kidkosmo <kidkos...@yahoo.com> 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
(E-Mail Removed)


 
Reply With Quote
 
John Spencer
Guest
Posts: n/a
 
      1st Jun 2010
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" <(E-Mail Removed)> wrote in message
> news:9ae1c0f5-95c7-4aa5-b8ab-(E-Mail Removed)...
> On May 31, 11:15 pm, kidkosmo <kidkos...@yahoo.com> 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
> (E-Mail Removed)
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Asterisk after String Delcaration???? Excel Monkey Microsoft Excel Programming 1 28th Apr 2009 09:46 AM
Re: Asterisk after String Delcaration???? Rick Rothstein Microsoft Excel Programming 0 28th Apr 2009 04:48 AM
RE: Asterisk after String Delcaration???? Jacob Skaria Microsoft Excel Programming 0 28th Apr 2009 04:41 AM
How to change text string to asterisk in text box Huayang Microsoft Access Security 2 7th Aug 2005 11:16 AM
Finding a Text String with an asterisk in it =?Utf-8?B?QWxleEE=?= Microsoft Access Queries 2 12th Apr 2005 08:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:30 PM.