Microsoft Office Forums


Reply
Thread Tools Display Modes

Data entry must include at least one alpha character

 
 
John134
Guest
Posts: n/a

 
      12-02-2008, 03:47 AM
Is it possible to provide an input mask or a validation rule so that the
entry must have at least one alpha character? Any number of characters is
acceptable.

And, would it also be possible that it start with a digit?

John134
 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a

 
      12-02-2008, 04:20 AM
Try a validation rule of:
Is Null OR Like "#*[a-z]*"

More info and examples of validation rules:
http://allenbrowne.com/ValidationRule.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John134" <(E-Mail Removed)> wrote in message
news:46CF9DCF-D76E-427D-9191-(E-Mail Removed)...
> Is it possible to provide an input mask or a validation rule so that the
> entry must have at least one alpha character? Any number of characters is
> acceptable.
>
> And, would it also be possible that it start with a digit?
>
> John134


 
Reply With Quote
 
John134
Guest
Posts: n/a

 
      12-02-2008, 06:02 AM
Thanks for the reply, Allen. The Like expression worked but the IsNull
didn't. I tried Not Is Null and that didn't prevent the field from being
skipped over either. The same with putting the rule on the control property.

I tried putting Not IsNull(fieldname) in the table properties and had no
luck there either.

Any suggestions appreciated.

John134
"Allen Browne" wrote:

> Try a validation rule of:
> Is Null OR Like "#*[a-z]*"
>
> More info and examples of validation rules:
> http://allenbrowne.com/ValidationRule.html
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "John134" <(E-Mail Removed)> wrote in message
> news:46CF9DCF-D76E-427D-9191-(E-Mail Removed)...
> > Is it possible to provide an input mask or a validation rule so that the
> > entry must have at least one alpha character? Any number of characters is
> > acceptable.
> >
> > And, would it also be possible that it start with a digit?
> >
> > John134

>
>

 
Reply With Quote
 
Allen Browne
Guest
Posts: n/a

 
      12-02-2008, 09:30 AM
If you want to *block* null, just set the field's Required property to Yes,
and use a validation rule of:
Like "#*[a-z]*"

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John134" <(E-Mail Removed)> wrote in message
news:6934D33D-290B-4197-9865-(E-Mail Removed)...
> Thanks for the reply, Allen. The Like expression worked but the IsNull
> didn't. I tried Not Is Null and that didn't prevent the field from being
> skipped over either. The same with putting the rule on the control
> property.
>
> I tried putting Not IsNull(fieldname) in the table properties and had no
> luck there either.
>
> Any suggestions appreciated.
>
> John134
> "Allen Browne" wrote:
>
>> Try a validation rule of:
>> Is Null OR Like "#*[a-z]*"
>>
>> More info and examples of validation rules:
>> http://allenbrowne.com/ValidationRule.html
>>
>> "John134" <(E-Mail Removed)> wrote in message
>> news:46CF9DCF-D76E-427D-9191-(E-Mail Removed)...
>> > Is it possible to provide an input mask or a validation rule so that
>> > the
>> > entry must have at least one alpha character? Any number of characters
>> > is
>> > acceptable.
>> >
>> > And, would it also be possible that it start with a digit?


 
Reply With Quote
 
John Spencer
Guest
Posts: n/a

 
      12-02-2008, 01:12 PM
The test only works if something causes the control to detect a change.
Simply entering the control and leaving it will not cause the control to
detect a change in its text value.

If you enter one character into the control and then delete the character the
control will detect the change and will check the validation rule.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County

John134 wrote:
> Thanks for the reply, Allen. The Like expression worked but the IsNull
> didn't. I tried Not Is Null and that didn't prevent the field from being
> skipped over either. The same with putting the rule on the control property.
>
> I tried putting Not IsNull(fieldname) in the table properties and had no
> luck there either.
>
> Any suggestions appreciated.
>
> John134
> "Allen Browne" wrote:
>
>> Try a validation rule of:
>> Is Null OR Like "#*[a-z]*"
>>
>> More info and examples of validation rules:
>> http://allenbrowne.com/ValidationRule.html
>>
>> --
>> Allen Browne - Microsoft MVP. Perth, Western Australia
>> Tips for Access users - http://allenbrowne.com/tips.html
>> Reply to group, rather than allenbrowne at mvps dot org.
>>
>> "John134" <(E-Mail Removed)> wrote in message
>> news:46CF9DCF-D76E-427D-9191-(E-Mail Removed)...
>>> Is it possible to provide an input mask or a validation rule so that the
>>> entry must have at least one alpha character? Any number of characters is
>>> acceptable.
>>>
>>> And, would it also be possible that it start with a digit?
>>>
>>> John134

>>

 
Reply With Quote
 
 
 
Reply

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a character limitation of 200 characters per entry? SRE Access Newsgroup 8 07-07-2006 01:54 AM
Function to look for alpha character CPK Access Newsgroup 2 02-23-2006 09:41 PM
how do I set up wbs number sequence that contains alpha character. cpmp322 Project Newsgroup 1 12-23-2005 06:42 PM
Need Help Extracting Alpha Numeric Data jturner Access Newsgroup 1 10-31-2005 08:19 PM
WBS - Roman Numerals, Alpha characters, number, alpha Paul Project Newsgroup 1 05-10-2005 09:02 PM



All times are GMT. The time now is 02:23 PM.