Is there a phone mask for a combobox

jpl458

Well-known member
Local time
Today, 11:21
Joined
Mar 30, 2012
Messages
1,218
I have a combobox the has a dropdown list of phone numbers. But they display as 5552221313. I want it to display (333)444-5555 but there seems to be no Field Property for combobox to display formatted phone numbers. The closest thing I could fine is this: Forms!Customers!Telephone.InputMask = "(###) ###-####". The information in the box is static.
 
Are you saying you're allowing your users to enter phone numbers not already in the list of the combo?
 
Are you saying you're allowing your users to enter phone numbers not already in the list of the combo?
No. I just want the phones to display as though they were formatted, in the Combobox. In the list now, they look like 5551212121. In the table they are masked and look like (555)-121-2121. Want to have the combobox display the phone numbers like they are in the table.
 
No. I just want the phones to display as though they were formatted, in the Combobox. In the list now, they look like 5551212121. In the table they are masked and look like (555)-121-2121. Want to have the combobox display the phone numbers like they are in the table.
Hi. Thanks for the clarification. You don't want Input Mask then. Have you tried the Format property?

If that doesn't work, can you please post the Row Source SQL for your combobox?
 
Hi. Thanks for the clarification. You don't want Input Mask then. Have you tried the Format property?

If that doesn't work, can you please post the Row Source SQL for your combobox?
Didn't even look at format. DOH! When I light up the box and hit format, the dropdown is empty. I am assuming then, that I have to roll my own mask in the format box. Is that correct? If so, I can't find anything that describes how to do that. The row source for the box is

Code:
SELECT tblPhone.[txtPhoneNumber] FROM tblPhone;

The field in the table has a phone mask, and is text.

Thanks
 
Didn't even look at format. DOH! When I light up the box and hit format, the dropdown is empty. I am assuming then, that I have to roll my own mask in the format box. Is that correct? If so, I can't find anything that describes how to do that. The row source for the box is

Code:
SELECT tblPhone.[txtPhoneNumber] FROM tblPhone;

The field in the table has a phone mask, and is text.

Thanks
You should be able to use the same markers I'm using here with the Format() function in the Format property, but the following is not tested, so please give it a try first.
Code:
SELECT Format(tblPhone.[txtPhoneNumber], "(000)-000-0000") FROM tblPhone;
 
You should be able to use the same markers I'm using here with the Format() function in the Format property, but the following is not tested, so please give it a try first.
Code:
SELECT Format(tblPhone.[txtPhoneNumber], "(000)-000-0000") FROM tblPhone;
Had to change the 0s to #s then it worked perfectly.

Thank you ,sir.
 

Users who are viewing this thread

Back
Top Bottom