PC Review


Reply
Thread Tools Rate Thread

Checking on the field of Right or mid Function.

 
 
sigh
Guest
Posts: n/a
 
      17th Nov 2003

Hi,
I would like to Validated the filed that content the
postal code. This field having 7 characters.
The First = Alpha or Asterisk (*)
The Second = Numeric or Asterisk (*)
The 3 = Alpha or Asterisk (*)
The 4 = Space or Asterisk (*)
The 5 = Numeric or Asterisk (*)
The 6 = Alpha or Asterisk (*)
The 7 = Numeric or Asterisk (*)

Examples: R5R 3X7

How do I use the right, left or mid function to check
each character?

Any help would be very appreciated.



 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      17th Nov 2003
Use Mid:

Mid(MyField, i, 1) will give you the ith character in the string.

However, another approach is to use Regular Expressions, rather than parsing
the string. John Nurick has an example posted as
http://www.mvps.org/access/modules/mdl0063.htm at "The Access Web"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)



"sigh" <(E-Mail Removed)> wrote in message
news:04c701c3ad54$f0eb81d0$(E-Mail Removed)...
>
> Hi,
> I would like to Validated the filed that content the
> postal code. This field having 7 characters.
> The First = Alpha or Asterisk (*)
> The Second = Numeric or Asterisk (*)
> The 3 = Alpha or Asterisk (*)
> The 4 = Space or Asterisk (*)
> The 5 = Numeric or Asterisk (*)
> The 6 = Alpha or Asterisk (*)
> The 7 = Numeric or Asterisk (*)
>
> Examples: R5R 3X7
>
> How do I use the right, left or mid function to check
> each character?
>
> Any help would be very appreciated.
>
>
>



 
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
function for checking for an odd number =?Utf-8?B?SmFuaXM=?= Microsoft Excel Programming 2 3rd Oct 2007 07:25 PM
Checking for Null in Function ? luqman Microsoft ASP .NET 5 23rd Apr 2007 12:53 PM
Checking mail function? Protoncek \(ex. SleeperMan\) Windows Vista General Discussion 3 1st Nov 2006 08:22 PM
primary text field checking for dupes after text field is updated =?Utf-8?B?U3VnYWRh?= Microsoft Access Form Coding 4 25th Mar 2005 07:11 PM
Checking record field by field =?Utf-8?B?RWR3YXJkQw==?= Microsoft Access VBA Modules 2 4th Feb 2005 03:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:18 PM.