Credit Card field

N

Novice

I have a form with a credit card field. They would like the field to be
formatted as a password field, except the last four digits should be shown as
number. (ex ************2345. Please anyone Help

thanks
 
B

Brendan Reynolds

Novice said:
I have a form with a credit card field. They would like the field to be
formatted as a password field, except the last four digits should be shown
as
number. (ex ************2345. Please anyone Help

thanks


The following expression in the Control Source property of a text box would
do it ...

=String(Len([TestText])-4,"*") & Right([TestText],4)

Replace "TestText" with the actual name of the field, and make sure that the
name of the text box is not the same as the name of the field.

Note that this only prevents the number from being shown on the form, anyone
with access to the underlying table or query will still be able to read the
number.
 
N

Novice

Hi Branden

I first want to thank you for your reply. However it seems that I have not
explained exactly what I wanted to do. The form uses a table for data entry
and has a command button to add new clients. When adding and typing the
Credit Card number I’d like it to show again the first 12 digits with
(asterisks *) and the last four with numbers using the Credit Card field if
possible. The expression works perfectly for existing Credit Card numbers. I
thank you again for your help.

Thanks

--
Humble


Brendan Reynolds said:
Novice said:
I have a form with a credit card field. They would like the field to be
formatted as a password field, except the last four digits should be shown
as
number. (ex ************2345. Please anyone Help

thanks


The following expression in the Control Source property of a text box would
do it ...

=String(Len([TestText])-4,"*") & Right([TestText],4)

Replace "TestText" with the actual name of the field, and make sure that the
name of the text box is not the same as the name of the field.

Note that this only prevents the number from being shown on the form, anyone
with access to the underlying table or query will still be able to read the
number.
 
R

Ron2006

Why hide it from the person who is entering the information in the
first place? They can obviously see it since they are entering it.

And then again how can they verify that they entered the number
properly. Dislexic fingers could enter the number incorrectly and
there would be no way of determining why it was wrong.

Ron
 
B

Brendan Reynolds

Novice said:
So true. It makes sense. Thanks Ron.
Humble


My phone has a feature where, when entering a PIN, it displays the digit you
entered for a few seconds before displaying an asterisk in its place. I
suppose it *might* be possible to do something like that in Access using an
unbound textbox, a module-level variable to store the text entered into the
unbound text box, and the form's Timer event. It's not something I've ever
tried, though.
 
B

Brendan Reynolds

Ron2006 said:
But then again a pin number for a phone system is usually not 16
digits long.


True, and therefore the potential for error is lessoned. On the other hand,
phone keypads are, for most people at least, more difficult to use than a
full-sized keyboard. I know I find the feature useful on my phone. But as I
said earlier, I've never tried to implement it in Access. I can't say for
sure if it would be possible or practical in Access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top