phone input mask

S

Sarah0824

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?
 
J

Jerry Whittle

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.
 
S

Sarah0824

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.
 
D

Duane Hookom

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.
 

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

Top