input masks

arkres

Registered User.
Local time
Today, 17:54
Joined
Sep 26, 2001
Messages
62
Hello,

Is it possible to have an input mask only in certain circumstances. I would like an input mask to appear for the phone in a table but only if the country address is in the US. Otherwise, it would need to be just a text field. Is there some code I can write for this? Thanks so much!!

Pat
 
You could try something like this in the OnCurrent event of your form:

Private Sub Form_Current()
If Me!country = "US" Then
Me!phone.InputMask = "(###) ###-####"
Else
Me!phone.InputMask = ""
End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom