473,395 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Credit card number rounding?

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.

Nov 13 '05 #1
1 1467
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!)

<pe***********@aol.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Simon Wigzell | last post by:
My client wants to have credit card information fields on his forms for his website visitors to be able to buy his wervices by credit card. The credit card info - Brand, number and expiry date will...
10
by: dries | last post by:
A friend of mine has a problem with his credit card validation routine and it is probably a simple thing to solve but I cannot find it. It has to do with the expiry dates. What happens is that as...
4
by: Michelle A. | last post by:
I have a form that takes in a credit card number, just a series of numbers 1234123412341234. When they get to the "Review" page and display all the information a user has entered, I would like the...
6
by: Arne | last post by:
What would be a good component for processing credit cards? (I am not using commerce server.) Would I need to encrypt the credit card column in the database?
4
by: Jerry Camel | last post by:
I'm writing and ASP.net app using vb .net. I need to interact with a credit card reader. I have one that sits inline with the keyboard. Works great, except for the fact that no matter what field...
12
by: Jerry Camel | last post by:
Not sure if this is a good place to post this... I'm writing and ASP.net app using vb .net. I need to interact with a credit card reader. I have one that sits inline with the keyboard. Works...
1
by: veg_all | last post by:
I am often surprised to see many websites require that the credit card not be entered with any spaces or dashes. This is very trivial to remove those characters that I wonder about the security of...
11
by: Paul Furman | last post by:
I'm setting up credit card payment through authorize.net and they have the option to send a POST string back to my site once complete. I'm not sure how to proceed. They don't have much to read...
1
by: securedcardss | last post by:
http://card.2youtop.info secured credit card card credit instant secured card cash credit secured card
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.