Sophisticated InputMasks....

txgeekgirl

Registered User.
Local time
Today, 09:38
Joined
Jul 31, 2008
Messages
187
I currently have a form that changes the InputMask at the form input level based on Type choice.

Type A can allow characters
Type B is numerics only

I need it to be a little more sophisticated than that.

Code:
If Type A then
                Me.Input.inputmask = xxxxxxxx
            Else
                Me.Input.inputmask = 99999999
           EndIF

I would like to mix case the first option so users can't possibly screw it up. but it isn't a true option.

9999_xx

I need it to hold a year and letter of last name like 2008 F for 6 types.

Anyone know a way to manipulate the input mask even further.
 
I use a dropdown list from a table to change the input mask for postcodes in ewffect on the AfterUpdate from the selection in the combi and input mask is set.

If you have a table for instance for Type and 2 records each brecord could contain the appropriate input mask and do this:

Code:
Function ClientsPostcode_ExampleAfterUpdate()

'       Apply the appropriate Postcode input Mask from the Example Field then move to Postcode

    With CodeContextObject
        .[Postcode].InputMask = .[Example].Column(1)
        DoCmd.GoToControl "Postcode"
    End With
    
End Function

Simon
 
Thanks Simon - I am going to give this a try!
 

Users who are viewing this thread

Back
Top Bottom