Data Presentation Techniques > Text Formatting > Formatting with an input mask |
Since it is common for the input and display formats to be the same, the NumberFormat property has an Edit Mask option (note the space between words). If you select this option, then the EditMask property setting will be used for both data input and display. However, the input and display formats need not be the same, so you are free to select a NumberFormat option that differs from the EditMask property.
For example, the following code applies a phone number template to a column for both display and editing:
Example Title |
Copy Code
|
---|---|
With TDBGrid1.Columns("Phone") .EditMask = "(###) ###-####" .NumberFormat = "Edit Mask" End With |
For more information on how to specify a data input mask, see Input Masking.