Connecting Tech Pros Worldwide Forums | Help | Site Map

Credit card number rounding?

penguin732901@aol.com
Guest
 
Posts: n/a
#1: Nov 13 '05
I am trying to print a contract for a customer specifying use of their
credit card number. For some odd reason the number is being rounded.

I checked - it's a text field. On the other hand, I format it as:
CCNO: Format([CCNum],"0000-0000-0000-0000")
The last two digits get rounded e.g. 36 becoms 40 etc.


Douglas J. Steele
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Credit card number rounding?


I believe it's being coerced into a numeric field before it's being
formatted, and the numeric field can't support the number of significant
digits you require.

You may have to use String functions:

CCNO: Left([CCNum], 4] & "-" & Mid([CCNum], 5, 4) & "-" & Mid([CCNum], 9, 4)
& "-" & Right([CCNum], 4)

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



<penguin732901@aol.com> wrote in message
news:1126640263.679335.196760@z14g2000cwz.googlegr oups.com...[color=blue]
>I am trying to print a contract for a customer specifying use of their
> credit card number. For some odd reason the number is being rounded.
>
> I checked - it's a text field. On the other hand, I format it as:
> CCNO: Format([CCNum],"0000-0000-0000-0000")
> The last two digits get rounded e.g. 36 becoms 40 etc.
>[/color]


Closed Thread