Ok...I have totally gone brain dead…

donbettis

Old User Gone Astray
Local time
Today, 13:51
Joined
Jan 23, 2001
Messages
103
Here’s my question/problem:

Let’s say I have a field in my table containing social security numbers. However on my form and report I only want the last four digits to show…

How do I do this…?

I can not for the life of me remember how to do this…


Thks in advance,

Don
 
Check out the Right function in Access help. this allows you to return a certain number of values from the right side. Should help
 
Well I have at long last gotten back to work on my database…

LNewton…thanks for your reply. Using the Right function could solve part of my problem. It will work on my form however, let’s say the social security number is 111-11-1111… Here is how they want it to been seen on the report

*******1111

I am not sure why they will not settle for just seeing the last four but they want to see it like above… They want it this way on the form as well but I think they will settle on just seeing the last four without seeing the asterisks on the form.

Thks

Don
 
Dim strOrigSSN As String
Dim strNewSSN As String

strOrigSSN = "123-45-6789"

strNewSSN = "*******" & Right(strOrigSSN, 4)

The new SSN should look like this: *******6789
I put the * in a string and using the & attached infront of the Right statement. I think this should work.
 

Users who are viewing this thread

Back
Top Bottom