Conditional Input Mask

T

tjtjjtjt

Is it possible to summon an input mask based on a value in a different control?
Example:
On a form asking for customer data--

If Country is USA, set Postal Code input mask for a US zip code.
If Country is Canada, set Postal Code input mask for a Canadian postal code.
Each additional country set to the appropriate postal code input mask.

What would be the process, if this is possible?
 
J

Jason Rice

Yes it is possible.

You can use something like this:

Select Case Country
Case "USA"
PostalCode.InputMask="00000\-9999;;_"
Case "Canada"
PostalCode.InputMask="" '- Sorry, I do not know the format for Canadian
Zip Codes
Case Else
Perhaps an error message?
End Select

HTH
Jason
 
T

tjtjjtjt

Thanks! That will do it.
I'm trying to translate minimal Excel VBA skills into Access, and it's slow
going. Thanks again for the help.

tj
 
Top