I'm pulling a phone number field in a form via SQL but it doesn't display as the Input Mask dictates in just this one form. All reports and other forms show it correctly so I'm wondering if there is a way to use the mask via format in the SQL statement?
The mask is: \(999") "000\-0000\ 9999;0;_ (as it is in the Customers table)
The mask formats a phone number field that shows, if there, an extension.
Example:
9545651055 13 will display as (954) 565-1055 13
Here is the code I have that does everything with the exception of formatting the [Business Phone] field.
Oddly enough the fax and mobile number fields, both use mask (@@@) @@@-@@@@, both display correctly in the code above. Of course the problem with the business phone is some have extensions.
How can I get these results displayed with the business phone formatted correctly?
Thanks,
The mask is: \(999") "000\-0000\ 9999;0;_ (as it is in the Customers table)
The mask formats a phone number field that shows, if there, an extension.
Example:
9545651055 13 will display as (954) 565-1055 13
Here is the code I have that does everything with the exception of formatting the [Business Phone] field.
Code:
SELECT [Customers Extended].ID, [Customers Extended].[Customer Name], [Customers Extended].[Company], FORMAT ('\(999") "000\-0000\ 9999;0;_')([Customers Extended].[Business Phone]) As [Business Phone], [Customers Extended].[Mobile Phone], [Customers Extended].[Fax Number]
FROM [Customers Extended]
WHERE (([Customers Extended].ID)<>Form!ID) And (([Customers Extended].[Customer Name]) Like "*" & [txtCustNameContains] & "*") And (([Customers Extended].[Company]) Like "*" & [txtCompanyNameContains] & "*")
ORDER BY [Customers Extended].[Customer Name];
How can I get these results displayed with the business phone formatted correctly?
Thanks,
Comment