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
 

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

Similar Threads

input mask issue 0
input mask 4
changing the Phone Number Input Mask to all for extensions 2
Input mask not showing in report 2
Zip code code 1
Input Mask - IP Address 3
Page numbers 3
Input Masks 1

Top