Social Security Numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've added an input mask to a text field to display dashes in the SSN without
actually storing them. I've run into a problem of people typing dashes when
entering SSNs, and they're being stored in the table with dashes while every
other SSN is stored without them. How do I set up the text field to not
accept dashes?
 
Hi,

I've found it's almost impossible to control human behavior this way - it's
easier to simply format it the way you want when saving to the table. In the
after update event of social security textbox (I'll call it txtSS for the
example):

me.txtSS = Replace (me.txtSS, "-","")

This will remove the dashes before saving to the table whether users type
them or not.
 
Is the input mask set to accept numeric values? Try setting the input
mask to 000\-00\-0000. See if that helps. You also want to make sure
the field can only accept 11 characters. 9 entered by the user and the
2 dashes from the input mask.
 

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

Back
Top