need help from Access Gurus

I’m trying to setup a conditional input mask for the postalcode/zipcode field.

Canada postal code input mask format “00000-9999;;"
US Zip code format input mask format "L0L 0L0;0;

I’ve setup the country field, so that CANADA, and USA are the only 2 choices from a drop down menu. I want the input mask to be conditional, and selecting an input mask depending on the country picked earlier.

How do I do it?

Re: need help from Access Gurus

I think if you use a lookup-table which contains the input masks of the different countries. Then it is very easy to add a new input mask and to change the value.

You can use this if only two possiblities are there, if its more than that, then use the select case. In this case, using the inputmask of the depending control property and afterupdate event of the 'master' one.

Sub MqsterControl_AfterUpdate()

If Me![MAsterControl] = "USA" then
Me![DependingControl].inputmask = "00000-9999"
Else
Me![DependingControl].inputmask = ">L0L 0L0"
End If

Re: need help from Access Gurus

ok, i'm going to cry ..

i get what you;re trying to do ..

but where do i type in that code?

Re: need help from Access Gurus

Plz don’t cry! ‘afterupdate event’ thats where you have to type the code, lets say your dependent input mask is canada, then go into the properties in the event tab, look for afterupdate events and copy paste the code there.

Re: need help from Access Gurus

i tried doing it ... but i can't figure out this afterupdate event thing. i can't find it.

[thumb=H]access3751_6184555.JPG[/thumb]

Re: need help from Access Gurus

I am sorry, I can’t figure out. What exactly you are trying to do. Can you send me ur database as a zip file. Or upload it here. If you can’t upload it here, pm me and I will give u my email addy.

Re: need help from Access Gurus

sorted out kay nahee?

Re: need help from Access Gurus

:( not really.. had trouble with the email. anyways... don't need it anymore..