Re: How do I display part of a SSN on a report?

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



Yes, this can be done at run time. The following assumes a checkbox on the
requesting form. True (checked) will show a partial SSN, False will show the
full SSN.

Example:
=IIf([Forms]![frmReqForm]![chkPartialSSN], "***-**-" & Right([SSNField], 4),
[SSNField])

--
Wayne Morgan
MS Access MVP


"Jerrel Baxter" <JerrelBaxter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D3ED4D17-271E-4737-BE73-CD76D51152E4@xxxxxxxxxxxxxxxx
>I now have the display of a part of the SSN field enabled but need to be
>able
> to display either all or part based on a requesting form's content field.
> Thanks for the example showing catenation of the "***-**-" string. That
> was
> very helpful and your comment regarding changing the field name of the
> textbox was also helpfule.
>
> Is there a way to programmatically change the Control Source content to
> allow selective display of either all or part of the SSN? A comment I
> attached on another reply may be helpful. I have tried setting
> PartSSN.ControlSource to another value but receive a message from the
> run-time system that this change cannot occur at run-time. Any ideas on
> where it could be done on a programmatic basis?
>
> "Wayne Morgan" wrote:
>
>> Make the textbox displaying the SSN a calculated textbox.
>>
>> Example Control Source:
>> =Right([SSNField], 4)
>> or
>> ="***-**-" & Right([SSNField], 4)
>>
>> For this to work, the textbox can not have the same name as the field.
>> So,
>> if the field is named SSNField, name the textbox txtSSNField.
>>
>> --
>> Wayne Morgan
>> MS Access MVP
>>
>>
>> "Jerrel Baxter" <JerrelBaxter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:BEE3D5FB-4474-4F3B-A0B6-D971F15A29A8@xxxxxxxxxxxxxxxx
>> > We produce a variety of reports for clients which contain SSN's. I
>> > need
>> > to
>> > be able to display only part of the SSN field on reports.
>>
>>
>>


.



Relevant Pages

  • Re: combo box populate text boxes
    ... display the contents of the combo's columns in other text boxes. ... If you added the unique index on the combination of fields in table design, ... So if I the combined SSN and NomYear exists, I want to display an errmsg. ...
    (microsoft.public.access.formscoding)
  • Re: About my Database
    ... Forms -- Display data, add data, edit data, and sometimes ... The way around this right now is for me to plug in the SSN manually ... >> - make the Basics table the Master with key on SSN ...
    (microsoft.public.access.gettingstarted)
  • Re: Make information "autocomplete" in a database
    ... all you need to do is have it display ... Create a combo box on your dataentry form that selects the SSN or DL# ... Reference the combobox column in each of the textbox, ... > If I am going to be adding multiple records (possibly lots of records for ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Need add one more blank form after submit
    ... be used for display. ... Gaurav Vaish | http://www.mastergaurav.org ... then submit, so the data will be save in SQL database, I would like to ... first name last name SSN ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • RE: Auto Fill Data
    ... data entry and control which values are input. ... The Combo Box gets its rows from a query statement in its RowSource ... For example, to include the SSN, FName, LName, and PhoneNumber ... another textbox by using the CB's Column property. ...
    (microsoft.public.access.forms)