>I want to set the InputMask (XXXX) for a textbox at runtime using another object property to determine the length (nNumber) of the mask. I have tried putting "REPLICATE('X',nNumber) directly onto the properties InputMask line and also into the expression builder. Both generate errors. How can I do this so that the user is only permitted to enter nNumber of characters of the 'X' lind?
>
>Thanks.
You say you want to do it at run-time? Try adding something like this to the InteractiveChnage, Valid or LostFocus of the controlling control:
THISFORM.TextboxWhatever.InputMask = replicate("X",lenc(alltrim(THIS.Value)))
or possibly adding the eval() function around the replicate if it references the other control. The problem with this is you may get an error during instantiation if the controlling control doesn't exist when the textbox instatiates. The eval() will fail.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao