Input mask save record problem

arkres

Registered User.
Local time
Today, 09:44
Joined
Sep 26, 2001
Messages
62
Hi,


I'm trying to use a telephone input mask (999) 000-0000 that would activate only if the Country ID = US or Canada. The problem is that the input mask will appear, but it won't save the form in that format. Also, how do I write the code to include US and Canada. Visual Basic seems to only allow me one or the other. I am definitely missing something. THANKS MUCH!!!!
 
Code:
If (CountryID = "US"  Or CountryID = "CDN") Then
    txtMyText.InputMask = "!(999") "000\-0000"
Else
    txtMyText.InputMask = ""
End If

This should do it, but it won't store the information in the table in this format, rather as ########## instead of (###) ###-####, unfortunately

hope this helps
 
yessir said:
Code:
it won't store the information in the table in this format, rather as ########## instead of (###) ###-####, unfortunately[/B][/QUOTE]

It [i]will[/i] store it if you define the Input Mask at [b]Table Level[/b] rather than form level.
 
thanks.....can i also make the mask conditional at the table level? Sorry....i'm fairly new to all of this.
 
Either/Or, basically.

If it's a conditional thing then you'd probably be better leaving the input mask to form level as you can dynamically create it and lose it with a tiny piece of code such as that posted above.
 

Users who are viewing this thread

Back
Top Bottom