How do I mask SOME characters in a field in Access 2007?

T

TAM

I want to be able to mask some of the characters in a field, i.e., as when
you receive a credit card receipt and all but the last four digits of your
card number are masked with asterisks. It is okay for them to be unmasked in
the table but on forms and reports I would like to be able to mask them.

I understand the "password" input mask, however this masks all the
characters, not just those I want to mask.

I am using Access 2007.
 
K

KARL DEWEY

Try spliting the field in a query and set the Input Mask property for
Password on the left part. Combine them in the form or report.
 
T

TAM

Thanks Karl. I thought of that but was looking for the "easier, all-in-one"
solution, ha.
 
L

Larry Linson

TAM said:
I want to be able to mask some of the characters in a field, i.e., as when
you receive a credit card receipt and all but the last four digits of your
card number are masked with asterisks. It is okay for them to be unmasked
in
the table but on forms and reports I would like to be able to mask them.

I understand the "password" input mask, however this masks all the
characters, not just those I want to mask.

I am using Access 2007.

Have you tried displaying something like this...

MyNewVariable = "****-****-****-" & Right([FieldName,4]

I am sure you can experiment with the Format function and come up with
something that would suffice, too. Masks tend to be quirky and inflexible,
and I use and recommend them only in very rare and limited circumstances.

Larry Linson
Microsoft Office Access MVP
 

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