PDA

View Full Version : Access Question


HUSKER55
02-28-2015, 03:52 PM
Does anyone know how to make a mask for a random sized account number.

The account can be a mix of numbers and / or lettors with a hypen stuck in there along the way.

Credit cards for the most part are 16 digits but American Express has changed the grouping of numbers

Working on that one.

thanks!
H55

Tom
02-28-2015, 05:07 PM
I think you need to have the same number of characters and format every time.

like ##/###/####?

HUSKER55
02-28-2015, 06:19 PM
I tried that but I also tried the \L thinking that whatever followed would be literal and would serve my purpose but it won't take.

thanks!

whodoyoulike
02-28-2015, 07:07 PM
Does anyone know how to make a mask for a random sized account number.

The account can be a mix of numbers and / or lettors with a hypen stuck in there along the way.

Credit cards for the most part are 16 digits but American Express has changed the grouping of numbers

Working on that one.

thanks!
H55

Don't credit cards start with a certain number e.g., Mastercard - "5", Visa - "4", Discover - "6" etc.

HUSKER55
02-28-2015, 07:40 PM
there is a built in 16 number format but american express uses a different type. Also I have some local accounts, medical and etc and I was trying to get a general mask.

For some reason the grouping is everything on these accounts.

Red Knave
02-28-2015, 08:41 PM
All cards have a method of validation. Some validation methods are public domain, many are not. Any time you accept a card number as input you need to strip all the accompanying non-numerics (spaces, dashes etc.) and apply whatever validation code is necessary. Most cards have check digits. Many Credit cards also have length checks, numeric sequence checks, additional numeric checks etc. to help keep them from being randomly generated.
Here's how to validate a Canadian Social Security number for example :
http://en.wikipedia.org/wiki/Social_Insurance_Number

Lots of information about CC numbering on that interwebnet thingy
http://webstandardssherpa.com/reviews/auto-detecting-credit-card-type/
http://download.cnet.com/Credit-Card-Number-Validator/3000-2066_4-10557818.html

Red Knave
02-28-2015, 08:48 PM
grouping is everything on these accounts.
Grouping is only important when the cards are printed. As a programmer, you are only interested in the numbers themselves.
There is no all purpose mask for card numbers. The numbering systems are specific to each card company network.

HUSKER55
02-28-2015, 10:26 PM
so as long as all the numbers are present in the right orderit doesn't matter?

HUSKER55
02-28-2015, 10:38 PM
Thanks for those links. A lot of my questions are answered.