I tried using the input mask for a phone number field, but it isn't catching all of the numbers. Is there a way to hard code into a query to have a number field display as (000) 777-0000?
I tried using the input mask for a phone number field, but it isn't catching all of the numbers. Is there a way to hard code into a query to have a number field display as (000) 777-0000?
I'd make your phone number field a text value not a numeric value.
In a query you can set the display format just like you did with an input maps, just go to the properties of the phone number field, set the input mask to phone number and select the option that allows you to display the field with the mask applied.
How do I set the display format in the query like you mention above?
With your query open in design view, right click on the field and select properties.
Alan
I set the input mask for the field in my query as
(which is what the prompts set is as after following the guide)Code:!\(999") "000\-0000;0;_
And it is still not displaying all of the 10 digit phone numbers in that format. They are all text fields. Any ideas why?
when you set up the input mask it should ask you if you want your data to be displayed that way as well (as per my previous post) are you not getting that prompt? Try removing the input mask and doing it again because you should be prompted to confirm if you want your data to be displayed in the same format as your input mask. If not you can always set it up on your table the same way.
When I set up the input mask it asks me how I want my data displayed and I select the(000) 000-0000 setting. I have tried setting it up as the input mask of my table, as well as the input mask of my query and it is not setting "All" data in those fields to that format, just most of them. I can continue to do the formatting in excel, i was just trying to alleviate a step, but doesn't want to work out.
What's the difference between the ones it is correctly formatting and the ones it's not formatting? It won't just randomly do it there has to be a reason. Is it the number of digits in the phone number? if it's not formatting the ones that may only have 7 digits (no area code) add the area code to those phone numbers and you should be fine.