That method seems simple enough but does not work for me.
Both the control format and mask do not work as expected.
I am using access 2003. The form is connected to a table and this field (
Phone number is bound to a text field with 50 characters.) I've deliberately
left the Format and mask field empty in the Table datasheet view to avoid
confusion.
The format field is set to "\(000\)\ 000-0000"
The mask field is set to !\(000") "000\-0000;;_
I've tested this with a blank database with a simple form. The mask will
force the user to fill the field correctly. As expected, the data is stored,
at least as viewed using the table datasheet view, with no formatting. As in:
3333333333.
Display of this data on the form is 3333333333 unless the field has the
focus. In which case the form will display the data as (333) 333-3333. If the
form is set to a new record, the field is blank until it received the focus,
then the mask appears to force correct entry.
Does this sound normal. It seems to me that if there is no data in the
field, the mask should be visible at all times even if the field is empty and
when a viewer is looking at and working with other data on a form he should
not have to click on a field to see the format or the mask.
Ultimately this field has to be connected to a table whose phone numbers are
already in the form 333.333.3333 and the user wants to see (333) 333-3333. I
suspect I will have to convert the text column to the form 3333333333 in the
table once I get this format and mask working in a reasonnable way.
Incidentally, data will display correctly if the data is stored in the table
in the form (333) 333-3333. However, the only way this format can be stored
in the table is for the user to type in all characters and spaces without the
use of a mask. If a mask is used it will store it with no extra characters as
mentioned previously.
I cant believe access works this way. I must be doing something wrong and I
suspect there is some configuration setting that prevents this from working
in a reasonnable way.
Thanks in advance for your comments.