phone input mask

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

Guest

Is there a way to make a phone input mask flow from right to left so I don't
have to type in a zip code?
 
Zip code? Area code!

I recommend not using input masks at all on phone numbers or zip codes. The
first time that you have to enter an address or phone number from somewhere
like Enlgand, you'll see why.
 
Sorry - I did mean area code...

I know it doesn't work well for places other than the US, but that won't be
a problem with this database.
 
I would follow Jerry's advice. Allow users to enter whatever they want and
use the after update event of the text box to add the finishing touches.

Private Sub txtPhone_AfterUpdate()
If Len(Me.txtPhone) < 9 Then
Me.txtPhone = "(715) " & Me.txtPhone
End If
End Sub

You could add more features to put in missing hyphens, check for numeric, or
other stuff.
 
Back
Top