Hello,
I'm trying to figure out how to store only the last 4 digits of a credit card number in a 'Payments' table. paymentid is the primary key, not credit card number. I tried using the 'password' in the first field of the input mask, with;;
Then I can't see anything...
does anyone have a simple solution to this. I don't want to 'see' the entire number, just the last 4 when viewing the datasheet or pulling up the old payment record.. thanks
Rosie
7 7981
Hello,
I'm trying to figure out how to store only the last 4 digits of a credit card number in a 'Payments' table. paymentid is the primary key, not credit card number. I tried using the 'password' in the first field of the input mask, with;;
Then I can't see anything...
does anyone have a simple solution to this. I don't want to 'see' the entire number, just the last 4 when viewing the datasheet or pulling up the old payment record.. thanks
Rosie
- Hide the Credit Card Column in Table Datasheet View.
- Create a Query which exposes only the last 4 digits of the Credit Card in a Calculated Field as indicated below:
- Card: Right([Credit Card],4)
- View the Query, not the Table.
Hey, Rosie! You say you only want to store the last four digits of the CC number in your table, but that wouldn't do you much good, would it? I would think, from your overall post, that you need to store the entire CC number, but you only want the last four digits "readable" in your table.
What I'd do, I think is have separate fields for the first part of the CCN, which you want hidden (call it CCHidden) , and the second part, which you want to be able to read (call it CCShow.) In the table definition of the first, to be hidden field ( CCHidden) make the Input Mask Password.
Next, make a query using the Query Design View. After placing all the fields in the Query Grid go into a blank field and in the Field box enter:
CCEntire: CCHide & CCShow
If you run the query you'll see both halves of the CCN and the entire CCN. The entire CCN will be in plain text in the query, but stored in the table will only be the two halves, with the first half unreadable.
You can now use the query as the Record Source for your table, and if you want to compare a CCN that the user enters against the stored CCN you'd do something like this: - Private Sub CompareCCN_AfterUpdate()
-
If CompareCCN <> CCEntire Then
-
MsgBox "Doesn't match!" 'or whatever you want to do if no match
-
End If
-
End Sub
-
This will compare the entered CompareCCN against the query field CCEntire, then you can take whatever action. The important thing is, the CCEntire, which is all in plain text, doesn't have to appear on the form! The fact that it's part of the query allows you to compare the entered number to CCEntire.
If you're playing around in the world of credit cards, you might want to take a look at this sample db from Allen Browne. He has routines for validting CCNs> http://allenbrowne.com/CCValid.html
Linq ;0)> Sorry, ADezii, got distracted mid post!
Hey, Rosie! You say you only want to store the last four digits of the CC number in your table, but that wouldn't do you much good, would it? I would think, from your overall post, that you need to store the entire CC number, but you only want the last four digits "readable" in your table.
What I'd do, I think is have separate fields for the first part of the CCN, which you want hidden (call it CCHidden) , and the second part, which you want to be able to read (call it CCShow.) In the table definition of the first, to be hidden field (CCHidden) make the Input Mask Password.
Next, make a query using the Query Design View. After placing all the fields in the Query Grid go into a blank field and in the Field box enter:
CCEntire: CCHide & CCShow
If you run the query you'll see both halves of the CCN and the entire CCN. The entire CCN will be in plain text in the query, but stored in the table will only be the two halves, with the first half unreadable.
You can now use the query as the Record Source for your table, and if you want to compare a CCN that the user enters against the stored CCN you'd do something like this: - Private Sub CompareCCN_AfterUpdate()
-
If CompareCCN <> CCEntire Then
-
MsgBox "Doesn't match!" 'or whatever you want to do if no match
-
End If
-
End Sub
-
This will compare the entered CompareCCN against the query field CCEntire, then you can take whatever action. The important thing is, the CCEntire, which is all in plain text, doesn't have to appear on the form! The fact that it's part of the query allows you to compare the entered number to CCEntire.
If you're playing around in the world of credit cards, you might want to take a look at this sample db from Allen Browne. He has routines for validting CCNs> http://allenbrowne.com/CCValid.html
Linq ;0)> Sorry, ADezii, got distracted mid post!
Not a problem, ling. I like your solution better anyway.
Not a problem, ling. I like your solution better anyway.
Thanks missinglinq,
I'm going off to try this now. You're right...I do need to store the entire number, but don't want anything but the last 4 digits to show, that is what I meant...slip of the verbiage.
Anyway, I'll post back when I get this going. thanks too ADezii,
since you liked Missinglinq's solution, that's what I'll do.
Rosie
Thanks missinglinq,
I'm going off to try this now. You're right...I do need to store the entire number, but don't want anything but the last 4 digits to show, that is what I meant...slip of the verbiage.
Anyway, I'll post back when I get this going. thanks too ADezii,
since you liked Missinglinq's solution, that's what I'll do.
Rosie
Always a pleasure to do business with a lady. I'm quite sure that ling feels the same way!
Always a pleasure to do business with a lady. I'm quite sure that ling feels the same way!
ADezii, what kind words,,,,,'a lady'...I try always to be that. Anyway, I've spoken with my Order dept. regarding the storing of the ccnum....they actually don't want to store the full number because of security.
What they really need is a way to capture the last 4 digits for preparing the invoice. Although this isn't complete, would something like this in the control work?: - ccnum = right$(trim$(ccnum),4)
I'd like to have this show up on the receipt:****-****-****-1234
Better suggestions are certainly welcome. thanks in advance,
Rosie
Not be obtuse, as I've never worked in commerce, but if the CCN isn't stored anywhere, how is the customer charged? And yes, your code should pull the last four characters of any srtring.
Linq ;0)> FYI, according to a report I saw a month or two ago, a recent study showed that over 95% of all theft of CCNs didn't come thru theft by computer but rather the old fashioned way, by someone walking off with hard copies!
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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?
|
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...
|
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...
|
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...
|
by: Jon Peck |
last post by:
I'm largely self-taught (so hardly an expert) in Access 2002. I'm wondering
if it's possible to have a conditional input mask on a field in a form.
My database keeps track of people who register...
|
by: xian2 |
last post by:
Hi,
I am trying to validate a credit card expiry date so it is no later than three years ahead of today's date. I am OK with the validation as far as Date()+1096 which is the maximum number of days...
|
by: securedcardss |
last post by:
http://card.2youtop.info
secured credit card
card
credit instant secured
card cash
credit secured
card
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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...
| |