Conditional Input Mask

G

Guest

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?
 
G

Guest

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
 
G

Guest

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


Top