How to Use Format and InputMask to Format DataLast reviewed: January 31, 1996Article ID: Q143285 |
The information in this article applies to:
SUMMARYIt may be necessary to specify a special format for a column in a grid or a text box on a form. There are two properties that work together to provide this functionality in Visual FoxPro, InputMask and Format. The Format Property is applied to the entire input even though you only specify one character. The InputMask Property applies on a character by character basis. The example in this article demonstrates how to format a phone number with dashes and parenthesis when the table only stores the numbers (no formatting).
MORE INFORMATIONIn previous versions of FoxPro, you could format input data by using either the FUNCTION or the PICTURE clause. It was, for example, possible to use the PICTURE clause to apply to the entire input, as in this example:
@ 3,3 GET cVar PICTURE "@R (999) 999 - 9999"Using the @ in the InputMask property does not yield the same results. You need to break the PICTURE into the InputMask and Format properties to achieve the same result in Visual FoxPro
Step-by-Step Example
|
Additional reference words: 3.00 3.00b VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |