Update Query for Replace dashes or hyphen

doran_doran

Registered User.
Local time
Today, 14:41
Joined
Aug 15, 2002
Messages
349
Hyphen or dash whatever you want to call, I need to get rid off it from my social security number. The field name is SSN.

Replace([SSN],"-","",1,12,0) will NOT work because Access 97.

Is there a remedy to replace - with nothing.?
 
newssn = mid([ssn], 1,3) & mid([ssn], 4,2) & mid([ssn], 6,3)

???
ken
 
hmm, that did not work...

Check out my print screen, May be i have it all wrong. But it's not working. It's prompting for NewSSN.
 

Attachments

  • SP32-20040816-112517.gif
    SP32-20040816-112517.gif
    20.6 KB · Views: 144
Take the brackets off NewSSN


???
ken
 
As a matter of fact don't even put it in...

Just the

'mid([ssn], 1,3) & mid([ssn], 4,2) & mid([ssn], 6,3)'

stuff
 
...

From SSN,

If I take the bracket of from SSN and then NewSSN is sorrounded by " and after runing the query it replaces all the ssn with NewSSN, the actual wording.
 
Both Method failed....

The last method (SEE ATTACHED PRINT SCREEN) Failed too.

444-55-6666 is now 444-55-66

Any idea ???
 

Attachments

  • SP32-20040816-113415.gif
    SP32-20040816-113415.gif
    20.4 KB · Views: 154
Got it....

Mid([ssn],1,3) & Mid([ssn],5,2) & Mid([ssn],8,4)

It's now working with above code. Thanks for all the help and hints.

THANKS THANKS THANKS
 

Users who are viewing this thread

Back
Top Bottom