Re: Remove numbers from beginning of social security number

Tech-Archive recommends: Fix windows errors by optimizing your registry



STOP. An update query will REPLACE the data. Since you want to change the display of the information, I would use an expression such as

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

Better yet, the following will return a blank if SSN is blank (or null), while the above will return "***-**-".

Format(RIGHT([SSN Field],4),"\*\*\*\-\*\*\-@@@@")



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

CMcGrann wrote:
I have a field that contains a social security number. Due to new privacy laws, we can only display the last four positions. I want to replace the first 5 characters with an asterisk, but leave the dashes and last four numbers as is. Can this be done with an update query?

123-45-6789 I want to replace with ***-**-6789
.



Relevant Pages

  • Re: copy value from field to another in same table, different reco
    ... the reason for my questions is to identify how to trigger the update and ... how to do the update...it'll require either an update query or some ... >>> opening amount displayed on the register form screen for the next day. ... >>> having problems with how to display a field value from a previous ...
    (microsoft.public.access.macros)
  • Displaying Photo
    ... use an update query. ... >I have a form that is able to display a photo for each ... >to go into the unbound field and mess with the expression ...
    (microsoft.public.access.forms)
  • Re: Date Conversion
    ... You cannot alter the date with an update query, ... Access stores the date/time data as a floating point number, ... The format is applied at display time, so it does not make sense to ... set the Format property of the field in the query. ...
    (comp.databases.ms-access)
  • Update Query, once only
    ... I import data into a table from a textfile. ... I wish to display this time in hours. ... original idea was to run an update query to divide the required field by 60. ...
    (microsoft.public.access.forms)
  • Re: Mass Transit
    ... qualifiers. ... of the laws and display a minimum level of skill to an examiner. ...
    (rec.arts.sf.fandom)