Weird phone number formatting phenomenon

M

mscertified

I have a bound form with an unbound area containing a phone number. This area
is filled programatically via records in another table.
The unbound control is set to Enabled=Yes, Locked=Yes, it has a format of
(@@@) @@@-@@@@.
The data when retrieved shows with the format like (123) 456-7890.
However if I click in the control, the data reverts to 1234567890.
If I then click in another control, it reverts to (123) 456-7890
How do I prevent the format changing when I click in the control?
 
E

Evi

That's not weird, it's normal. If you format a date field in a table as mmm
dd/mm/yy
It looks like Fri 25/12/08
but as soon as you click on it, its beauty melts like plastic surgery in a
tropical sun and you are left with plain ol' 25/12/2008


Evi
 
F

fredg

I have a bound form with an unbound area containing a phone number. This area
is filled programatically via records in another table.
The unbound control is set to Enabled=Yes, Locked=Yes, it has a format of
(@@@) @@@-@@@@.
The data when retrieved shows with the format like (123) 456-7890.
However if I click in the control, the data reverts to 1234567890.
If I then click in another control, it reverts to (123) 456-7890
How do I prevent the format changing when I click in the control?

Set it to:
Enabled = No
Locked = Yes
 
M

mscertified

It's unformatted in the table.
It's formatted on the form - until I click in the control.
 
J

John W. Vinson

I have a bound form with an unbound area containing a phone number. This area
is filled programatically via records in another table.
The unbound control is set to Enabled=Yes, Locked=Yes, it has a format of
(@@@) @@@-@@@@.
The data when retrieved shows with the format like (123) 456-7890.
However if I click in the control, the data reverts to 1234567890.
If I then click in another control, it reverts to (123) 456-7890
How do I prevent the format changing when I click in the control?

Fred's suggestion should work; if you want this to work with an enabled
control, though, you should also - or instead! - set the Input Mask. It
controls the appearance of the control when it has the focus.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top