Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Format mask for phone number (Access 2000)

    I have my phone number stored in the system as 10 digits. In a query, I am trying to format the phone number, and I cannot get it to work for the list box. In regular text fields, it works fine

    In my query, I have tried (###") "###-#### and (999) 999-9999 as the input masks. The query is used to populate a list box in a form. Any ideas how to get the listbox to display the phone number properly?

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Format mask for phone number (Access 2000)

    List boxes don't have an input mask, and they ignore the input mask of a field they display.
    Instead, set the format in the query to (@@@) @@@-@@@@ or use a calculated field FormattedPhone: Format([Phone], "(@@@) @@@-@@@@")

  3. #3
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format mask for phone number (Access 2000)

    Awesome, that works great. For a PostalCode, I would like to have it uppercase, displayed like T3E 3B7. It is currently stored without a space, sometime in lowercase. I would like to put it in Uppercase with a space. I can get it uppercase, but I cannot get the space in there as well

    Ideas?

    Thanks

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Format mask for phone number (Access 2000)

    Similar to the phone number: set the format to<pre>>@@@ @@@</pre>

    or use a calculated expression<pre>Format([PostalCode], ">@@@ @@@")</pre>


  5. #5
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format mask for phone number (Access 2000)

    O OK. I was using the letters and number instead of the @@@.

    Thanks a bunch!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •