Re: How do I display part of a SSN on a report?
- From: "Wayne Morgan" <comprev_gothroughthenewsgroup@xxxxxxxxxxx>
- Date: Thu, 5 Jan 2006 15:40:25 -0600
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.
>>
>>
>>
.
- References:
- Re: How do I display part of a SSN on a report?
- From: Wayne Morgan
- Re: How do I display part of a SSN on a report?
- Prev by Date: Re: Report Header
- Next by Date: Re: group header and columns report question
- Previous by thread: Re: How do I display part of a SSN on a report?
- Next by thread: Vertical line between the columns of a two-column report
- Index(es):
Relevant Pages
|