dbTalk Databases Forums  

Masking Characters

comp.databases.ms-access comp.databases.ms-access


Discuss Masking Characters in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Neil
 
Posts: n/a

Default Masking Characters - 05-04-2011 , 02:55 PM






In an Access form, I need to hide part of a SSN in certain conditions, and
show the whole thing in others. In other words, sometimes:

123-45-6789

and other times:

***-**-6789

Can that be done with the Format property?

Reply With Quote
  #2  
Old   
John W. Vinson
 
Posts: n/a

Default Re: Masking Characters - 05-04-2011 , 03:59 PM






On Wed, 4 May 2011 14:55:05 -0500, "Neil" <neil.ginsberg+newsgroup (AT) gmail (DOT) com>
wrote:

Quote:
In an Access form, I need to hide part of a SSN in certain conditions, and
show the whole thing in others. In other words, sometimes:

123-45-6789

and other times:

***-**-6789

Can that be done with the Format property?

The Format property isn't that flexible. One way to do it would be to base the
form or report on a Query, and in the query put a calculated field

ShowSSN: "****-**-" & Right([SSN], 4)

Of course if the user has a way to look at the table or queries directly they
could find the actual SSN easily, so this isn't any sort of real security; but
it will at least conceal the data from casual viewing.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/For...-US/accessdev/
http://social.answers.microsoft.com/.../en-US/addbuz/
and see also http://www.utteraccess.com

Reply With Quote
  #3  
Old   
Neil
 
Posts: n/a

Default Re: Masking Characters - 05-04-2011 , 05:16 PM



"John W. Vinson" <jvinson (AT) STOP_SPAM (DOT) WysardOfInfo.com> wrote

Quote:
On Wed, 4 May 2011 14:55:05 -0500, "Neil"
neil.ginsberg+newsgroup (AT) gmail (DOT) com
wrote:

In an Access form, I need to hide part of a SSN in certain conditions, and
show the whole thing in others. In other words, sometimes:

123-45-6789

and other times:

***-**-6789

Can that be done with the Format property?


The Format property isn't that flexible. One way to do it would be to base
the
form or report on a Query, and in the query put a calculated field

ShowSSN: "****-**-" & Right([SSN], 4)

Of course if the user has a way to look at the table or queries directly
they
could find the actual SSN easily, so this isn't any sort of real security;
but
it will at least conceal the data from casual viewing.
Thanks, John. Security isn't a major concern. The only thing is, in deciding
which field to use (SSN or ShowSSN, as you've called it), I'd need to us an
IIF statement in an unbound text box. That creates problems with continuous
form view. Oh well. Guess you can't have your cake and eat it too....

Reply With Quote
  #4  
Old   
John W. Vinson
 
Posts: n/a

Default Re: Masking Characters - 05-04-2011 , 05:47 PM



On Wed, 4 May 2011 17:16:57 -0500, "Neil" <neil.ginsberg+newsgroup (AT) gmail (DOT) com>
wrote:


Quote:
Thanks, John. Security isn't a major concern. The only thing is, in deciding
which field to use (SSN or ShowSSN, as you've called it), I'd need to us an
IIF statement in an unbound text box. That creates problems with continuous
form view. Oh well. Guess you can't have your cake and eat it too....

Not sure at what point you decide which is which, but I'd be inclined to have
two forms - one with the full SSN for data entry and editing, and a different
form for users who shouldn't see the full number. You could even have the two
forms in two different frontends, if the deciding factor is "whose PC should
this be on".
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/For...-US/accessdev/
http://social.answers.microsoft.com/.../en-US/addbuz/
and see also http://www.utteraccess.com

Reply With Quote
  #5  
Old   
Neil
 
Posts: n/a

Default Re: Masking Characters - 05-04-2011 , 10:14 PM



"John W. Vinson" <jvinson (AT) STOP_SPAM (DOT) WysardOfInfo.com> wrote

Quote:
On Wed, 4 May 2011 17:16:57 -0500, "Neil"
neil.ginsberg+newsgroup (AT) gmail (DOT) com
wrote:


Thanks, John. Security isn't a major concern. The only thing is, in
deciding
which field to use (SSN or ShowSSN, as you've called it), I'd need to us
an
IIF statement in an unbound text box. That creates problems with
continuous
form view. Oh well. Guess you can't have your cake and eat it too....


Not sure at what point you decide which is which, but I'd be inclined to
have
two forms - one with the full SSN for data entry and editing, and a
different
form for users who shouldn't see the full number. You could even have the
two
forms in two different frontends, if the deciding factor is "whose PC
should
this be on".
Right, that would make sense. But in this case it's not based on the user,
it's based on the record. If the record has a certain status, the user
should see the SSN; but with a different status, only partial SSN. (Don't
ask me why. I don't know. :-) )

So the same user would be seeing SSNs in some records and partial SSNs in
others.

But I'm not sure if they're going to be using Continuous Forms view anyway.
But it would be nice for them to have that option. But if it can't be, then
it can't be.

Thx.

Reply With Quote
  #6  
Old   
John Spencer
 
Posts: n/a

Default Re: Masking Characters - 05-05-2011 , 07:29 AM



Then you could generate the proper view depending on the status.

Field: ShowSSN: IIF(Status = "A",[SSN],"***-**-} & Right([SSN],4))

Of course, this means that the SSN cannot be edited or changed or added
without some more manipulation of controls on the form.


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

On 5/4/2011 11:14 PM, Neil wrote:
Quote:
"John W. Vinson"<jvinson (AT) STOP_SPAM (DOT) WysardOfInfo.com> wrote in message
news:kpl3s6l8gkvvb29oam8vc2rie8udbijnb8 (AT) 4ax (DOT) com...
On Wed, 4 May 2011 17:16:57 -0500, "Neil"
neil.ginsberg+newsgroup (AT) gmail (DOT) com
wrote:


Thanks, John. Security isn't a major concern. The only thing is, in
deciding
which field to use (SSN or ShowSSN, as you've called it), I'd need to us
an
IIF statement in an unbound text box. That creates problems with
continuous
form view. Oh well. Guess you can't have your cake and eat it too....




Reply With Quote
  #7  
Old   
Access Developer
 
Posts: n/a

Default Re: Masking Characters - 05-05-2011 , 01:22 PM



Instead of trying to manipulate the view of the SSN in the form, manipulate
it in a Query and display the contents of the Query in the Form. Even if
you use the SSN as the record key (which is Not A Good Idea, BTW, for
multiple reasons), you could not display the actual SSN, only the formatted
SSN which you create in a Calculated Field. This will eliminate the problem
with continuous forms.

--
Larry Linson, Microsoft Office Access MVP
Co-author: "Microsoft Access Small Business Solutions", published by Wiley
Access newsgroup support is alive and well in USENET
comp.databases.ms-access

"Neil" <neil.ginsberg+newsgroup (AT) gmail (DOT) com> wrote

Quote:
In an Access form, I need to hide part of a SSN in certain conditions, and
show the whole thing in others. In other words, sometimes:

123-45-6789

and other times:

***-**-6789

Can that be done with the Format property?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.