Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Can I Format a Data Field on a Report?

Status
Not open for further replies.

txdave35

Technical User
Nov 20, 2008
122
US
Hey guys,

I have designed report in Access that prints a person's SSN number as 333-33-3333. I would like my report to only show the last 4 digits on the social.

Is there a way to format this directly from the report design? The SSN is a database field in one of my Access tables
 
How about
Code:
Right(ssn,4)


or
Code:
"***-**-" & Right(ssn,4)
 
Where would I enter this? Tried putting it in the FORMAT properties, but it did not do anything.
 
put it in the control source of the ssn Textbox
 
You would need to add an equal sign to the left of any expression that isn't a field name. Also, make sure the name of the text box is not the name of a field in the report's record source.
Code:
  =Right(ssn,4)


Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top