Postal Code Input Mask

G

Guest

Hi,

I want to setup the "PostalCode" input mask for Canadian provinces to be
different than out of country people based on the "Province" field, the code
that I have is:

If Province Like "??" Then
Forms!Registration!PostalCode.InputMask = ">L0L\ 0L0"
Else: Forms!Registration!PostalCode.InputMask = " "

I don't know why my code is not working, or simply I just can't have
different input mask for different fields.

Thanks
 
G

Guest

try this code in the afterupdate event of Province:

If me.Province Like "??" Then
me.PostalCode.InputMask = ">L0L\ 0L0"
Else
me.PostalCode.InputMask = " "
endif
 
G

Guest

Do you mean that I need to copy the same code in two places ("after update
event", and "Form_Current")?! Anyways, I tried either way and it didn't work!
When I put the code in the (Form_Current) it gives me the following message:

Compile Error:
Method or data member not found

I found out that when I delete the ".InputMask" from the code, and try to
input another attribute, it gives me only the ".value" option and nothing
else! and this was the reason I used the format
"Forms!Registration!PostalCode.InputMask"

Thank you
 

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

Top