Access Query - convert Short Text to Number format

MS Access 2013.

Data format is Short text and it stores SSN's and TIN's with dashes. Length of string varies between 10 (TIN) and 11 (SSN).

I'd like to have a formula for a new field that strips out the dashes and any leading zeroes and also converts to Number format. Thanks.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Eric ShermanAccountant/DeveloperCommented:
Try this for starters ....

Expr1: Val(Replace([YourTextFieldName],"-",""))


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TIN and SSN are not numeric values.  They are codes and should always be stored as text, preferably without any dashes.
Jeffrey CoachmanMIS LiasonCommented:
<No Pints wanted>
Pat is correct.

Store these values as Text.
(A very rough rule is that you store values as numbers only if you are doing mathematical calculations with these values, ... )

This is also a rare case whee I recommend using an Input Mask.
There is a wizard that will walk you through the process.
(Select the option to NOT store the dashes)

SolarWinds® IP Control Bundle (IPCB)

Combines SolarWinds IP Address Manager and User Device Tracker to help detect IP conflicts, quickly identify affected systems, and help your team take near instantaneous action. Help improve visibility and enhance reliability with SolarWinds IP Control Bundle.

K_DeutschAuthor Commented:
This does exactly what I needed, thanks.

Eventually I need to join the results to another table that is storing the SSN's as numbers, so I don't have a choice.
Eric ShermanAccountant/DeveloperCommented:
Glad I could help ... Thanks for the points.

Evert JorDVM/ResearcherCommented:
If you are storing numbers then use a number field - not text. Text fields will hamper any database driven search.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.