PC Review


Reply
Thread Tools Rate Thread

create error message for input mask in table

 
 
=?Utf-8?B?S0c=?=
Guest
Posts: n/a
 
      22nd Feb 2006
I have to set a validation rule with customised error message for a national
insurance number. This has two letters, six numbers in groups of 2 and 1
letter.
I have tried
Like "AA" " " "11" " " "11"" " "11" " " "A" where A represents a letter, 1 a
number and " " a space. Whatever I key into the table generates the same
error message - whether it is right or wrong.
I can do it with an input mask LL 00 00 00 L but only get a beep, not a
customised error messsage. I have tried setting the input mask with a
validation error message to no avail.
I am using Access 2003 Database.
KG
 
Reply With Quote
 
 
 
 
Graham Mandeno
Guest
Posts: n/a
 
      22nd Feb 2006
Hi KG

The pattern matching string for Like is very different from that for an
input mask. You can find out all about it if you search for Like in the
online help.

To get you going, the following expression should work:

Like "[A-Z][A-Z] ## ## ## [A-Z]"

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


"KG" <(E-Mail Removed)> wrote in message
news:B86DBE70-A271-4BBC-8142-(E-Mail Removed)...
>I have to set a validation rule with customised error message for a
>national
> insurance number. This has two letters, six numbers in groups of 2 and 1
> letter.
> I have tried
> Like "AA" " " "11" " " "11"" " "11" " " "A" where A represents a letter, 1
> a
> number and " " a space. Whatever I key into the table generates the same
> error message - whether it is right or wrong.
> I can do it with an input mask LL 00 00 00 L but only get a beep, not a
> customised error messsage. I have tried setting the input mask with a
> validation error message to no avail.
> I am using Access 2003 Database.
> KG



 
Reply With Quote
 
=?Utf-8?B?S0c=?=
Guest
Posts: n/a
 
      23rd Feb 2006
Hi Graham,
Thank you so much - at about 10.30 last night I finally realised how to do
it but the help page I used suggested a single quote mark after the Like and
at the end of the string. I also discovered that spaces can be inserted by
using [ ] and symbols too.

Once again - thanks. Kate - KG

"Graham Mandeno" wrote:

> Hi KG
>
> The pattern matching string for Like is very different from that for an
> input mask. You can find out all about it if you search for Like in the
> online help.
>
> To get you going, the following expression should work:
>
> Like "[A-Z][A-Z] ## ## ## [A-Z]"
>
> --
> Good Luck!
>
> Graham Mandeno [Access MVP]
> Auckland, New Zealand
>
>
> "KG" <(E-Mail Removed)> wrote in message
> news:B86DBE70-A271-4BBC-8142-(E-Mail Removed)...
> >I have to set a validation rule with customised error message for a
> >national
> > insurance number. This has two letters, six numbers in groups of 2 and 1
> > letter.
> > I have tried
> > Like "AA" " " "11" " " "11"" " "11" " " "A" where A represents a letter, 1
> > a
> > number and " " a space. Whatever I key into the table generates the same
> > error message - whether it is right or wrong.
> > I can do it with an input mask LL 00 00 00 L but only get a beep, not a
> > customised error messsage. I have tried setting the input mask with a
> > validation error message to no avail.
> > I am using Access 2003 Database.
> > KG

>
>
>

 
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
RE: Input mask error message ryguy7272 Microsoft Access VBA Modules 1 20th Feb 2010 08:24 PM
Input mask error message =?Utf-8?B?RU1hbm5pbmc=?= Microsoft Access Form Coding 6 17th Nov 2005 10:54 PM
Input Mask error message in adp =?Utf-8?B?RU1hbm5pbmc=?= Microsoft Access Form Coding 0 16th Nov 2005 10:17 PM
Create input mask in table using VBA =?Utf-8?B?TWFyayBBbW90aA==?= Microsoft Access 1 31st Aug 2005 02:15 PM
Input Mask Error Message Paul Scott Microsoft Access Form Coding 4 30th Jun 2004 07:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:14 PM.