How to disregard symbols

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

Guest

I have a text box where a number is suppose to be entered. Sometime like a
SSN. So if someone puts in 111-22-3333 I would like it to disregard the -
and just store the 11122333. How can you do this?
 
I really wasn't looking for a input mask. Because not always are they going
to be putting in a SSN. It could be just a regular number like 11223.
 
Thanks that will probably work.

Roger Carlson said:
OK, then use the Replace function in the AfterUpdate event of the control to
replace "-" with "". Something like this:

Private Sub txtSSN_AfterUpdate()
txtSSN= Replace(txtSSN, "-", "")
End Sub

Where the name of the control is txtSSN.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Back
Top