Results 1 to 3 of 3
  1. #1
    kbremner is offline Novice
    Windows Vista Access 2003
    Join Date
    Oct 2010
    Posts
    12

    Format phone number in an unbound list box


    How do I format a phone number (entered as text field) to display " (123) 456-7890 " in an unbound list box populated by a query?

    SELECT tblContacts.ContactID, tblContacts.FileName, tblClients.Client, tblContacts.Phone FROM tblClients ORDER BY tblContacts.FileName;

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    not sure. I wonder if you can mask a certain column of a listbox? I would doubt it though. I would think it best to put the phone number in a separate control if a mask is needed.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You can use the Format() function in the SELECT clause to add a formatted field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Customer Phone List Example form
    By pkstormy in forum Code Repository
    Replies: 2
    Last Post: 05-06-2017, 03:06 PM
  2. Unbound list box
    By waseemthonse in forum Forms
    Replies: 1
    Last Post: 11-02-2010, 07:36 PM
  3. Custom format for phone#
    By SmokingMan in forum Access
    Replies: 4
    Last Post: 08-02-2010, 10:41 PM
  4. Phone number format
    By ManvinderKaur in forum Access
    Replies: 1
    Last Post: 06-24-2010, 08:07 AM
  5. Phone number in (000) 000-0000
    By Ajay in forum Queries
    Replies: 9
    Last Post: 03-12-2010, 11:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums