Postal Code Input Mask

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
try this code in the afterupdate event of Province:

If me.Province Like "??" Then
me.PostalCode.InputMask = ">L0L\ 0L0"
Else
me.PostalCode.InputMask = " "
endif
 
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
 
Back
Top