Format Number Expression

  • Thread starter Kath via AccessMonster.com
  • Start date
K

Kath via AccessMonster.com

Hi there! I am working on a system that talks to our PR db. This system
has a need for the SSN, however, the file we need to submit does not have
dashes and the PR system is capturing dashes in the data field. I do not
want to do an update query to remove the dashes, but want to use the
formatnumber expression to remove the dashes in my query - which will be
used as an export file to send to an outside organization. Can anyone help
me in this? I have tried:
Expr1: FormatNumber([EMPLOYEE]![E_SSN],"000000000") and Expr1: FormatNumber
([EMPLOYEE]![E_SSN],"000000000;;_") and neither works..I am missing
something....but not sure what. Any help would be GREATLY appreciated. :)
 
J

John Vinson

Hi there! I am working on a system that talks to our PR db. This system
has a need for the SSN, however, the file we need to submit does not have
dashes and the PR system is capturing dashes in the data field. I do not
want to do an update query to remove the dashes, but want to use the
formatnumber expression to remove the dashes in my query - which will be
used as an export file to send to an outside organization. Can anyone help
me in this? I have tried:
Expr1: FormatNumber([EMPLOYEE]![E_SSN],"000000000") and Expr1: FormatNumber
([EMPLOYEE]![E_SSN],"000000000;;_") and neither works..I am missing
something....but not sure what. Any help would be GREATLY appreciated. :)

Is the data type of the E_SSN field Number (which would not be a very
good idea) or (more properly) Text?

If it's Text and the field actually contains the hyphens, you could
simply pick out the digits:

ExpSSN: Left([E_SSN], 3) & Mid([E_SSN], 5, 2) & Right([E_SSN], 4)


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Expression Problem 3
round vs. formatnumber 1
Find and replace 4
Access Query problem 1
Number Format in Chart Datasheet 1
Importing SSN from Excel To Access Changes Format 3
Clean numbers 3
use expression as field name in query 2

Top