You can use the Replace function to get rid of hyphens or spaces:
strCardNumber = Replace(Replace(strCardNumber, "-", ""), " ", "")
You can use the Mid function to look at each digit in the string in turn
For intLoop = 1 To Len(strCardNumber)
strCurrChar = Mid(strCardNumber, intLoop, 1)
Next intLoop
You can use the Mod function to determine whether a particular value of
intLoop is odd or even:
If intLoop Mod 2 = 0 Then
' intLoop is even
Else
'intLoop is odd
End If
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9777
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Zen Masta"
wrote in message
news:eqKtOjSeGHA.1204@TK2MSFTNGP02.phx.gbl...
> https://www.azcode.com/Mod10/
>
> I found this clever JavaScript and was wondering if anyone knows of a
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9777
> similar one in vb for use in ms access... preferably one that can handle
> hyphens separating the number groups.
>