Hyphens...

  • Thread starter Thread starter Guest
  • Start date Start date
You can't add hyphens to a number. However you can add hyphens to a text
field with numerical characters in it. It would take some work using the
InStr, Left, Mid, and Right functions.

You can format both numbers and text to show hyphens that aren't actually
stored in the database. Set the format to:
@@@-@@-@@@@
 
How do i add hyphens to a number...???
i.e: from 000000000 to 000-00-0000...

If you're storing Social Security Numbers or other "numbers" which are
really identifiers, not used for calculations, consider using a Text
datatype instead of a Number. You cannot store punctuation characters
in a number field (it's easy in a Text field of course).

You can *display* the number with hyphens using the Format property:

000-00-0000

as a format will insert the hyphens and give you leading zeros.
However, it will not change what's actually stored in the table.

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


Back
Top