input mask phone international

cardgunner

Registered User.
Local time
Yesterday, 23:29
Joined
Aug 8, 2005
Messages
210
Well I looked this up on the forum and I found the link below.

I'm trying to make his into mine with no knowledge of code other then it exists and It's not easy to learn by hunting and pecking around it.

I want to create a command(?) that will look at my country field in the form and that will determine the input mask of the phone number. I thinbk it's a pretty cool thought. However my code is missing alot.
Code:
Private Sub phone_GotFocus()

If Me.[country] = "USA" Then
    InputMask = "(999) 999-9999 "
    Else: InputMask = ""
End If

End Sub

I'm sure I have something that needs to be declared.

I'm not getting any mask.


http://www.access-programmers.co.uk/forums/showthread.php?t=51086&highlight=input+mask+phone+numbers
 
Woohooo!!

I got it. Or at least it works, until....
Code:
Private Sub phone_GotFocus()

If Me![country] = "USA" Then
    Me!phone.InputMask = "(999) 999-9999 "
    Else: Me!phone.InputMask = ""
End If


End Sub

Please don't hesitate to correct me and this code. I'm learning as I go.
 

Users who are viewing this thread

Back
Top Bottom