Displaying masked phone numbers in a list box (1 Viewer)

jpl458

Well-known member
Local time
Today, 09:08
Joined
Mar 30, 2012
Messages
1,038
I have phone numbers that have input masks. When I run the query, all is well. But when the query puts data in a listbox they are un formatted. I read solution that I don't understand. Put this "Format([YourFieldName],"(000) 000-0000")" in the "Field Box" of the Listbox. I can't find the Field box, plus the query returns 3 phone numbers
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:08
Joined
Oct 29, 2018
Messages
21,473
I have phone numbers that have input masks. When I run the query, all is well. But when the query puts data in a listbox they are un formatted. I read solution that I don't understand. Put this "Format([YourFieldName],"(000) 000-0000")" in the "Field Box" of the Listbox. I can't find the Field box, plus the query returns 3 phone numbers
Use that in the SQL Row Source for your Listbox. For example:
SQL:
SELECT Format([PhoneField], "(000) 000-0000") AS Column1 FROM TableName
 

jpl458

Well-known member
Local time
Today, 09:08
Joined
Mar 30, 2012
Messages
1,038
Never mind, I found it.
 

jpl458

Well-known member
Local time
Today, 09:08
Joined
Mar 30, 2012
Messages
1,038
Use that in the SQL Row Source for your Listbox. For example:
SQL:
SELECT Format([PhoneField], "(000) 000-0000") AS Column1 FROM TableName
I put this in the field box of the query:
Code:
Expr: Format([YourFieldName],"(000) 000-0000")

And changed the name to protect the innocent, and it works fine. I did it for each of the phone numbers in the query

Thanks for the response.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:08
Joined
Oct 29, 2018
Messages
21,473
I put this in the field box of the query:
Code:
Expr: Format([YourFieldName],"(000) 000-0000")

And changed the name to protect the innocent, and it works fine. I did it for each of the phone numbers in the query

Thanks for the response.
Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom