Results 1 to 9 of 9
  1. #1
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Format List Box (2002 SP-3)

    Is there anyway to format entries in a list box?
    All my phone numbers are coming out "xxxxxxxxxx" instead of "(xxx) xxx-xxxx"
    Thanks!
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Format List Box (2002 SP-3)

    Listbox items are strings, so you would have to do the formatting in the query you use to populate the listbox.
    Charlotte

  3. #3
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Format List Box (2002 SP-3)

    OK. . .uh. . .
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,613
    Thanks
    3
    Thanked 58 Times in 58 Posts

    Re: Format List Box (2002 SP-3)

    Quite frankly, we've found the best way is to store the formatting characters in the phone number rather than using a mask to display them. For one thing you get phone numbers in most parts of the world that don't look anything like the North American plan, and using a mask with them creates havoc. What we did in one case was to create a mask based on the first few characters entered (we insisted that they store the International access code) and then apply it dynamically during input, but store the formating characters in the field. Hope this makes sense.
    Wendell

  5. #5
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Format List Box (2002 SP-3)

    <img src=/S/dizzy.gif border=0 alt=dizzy width=15 height=15>
    Nothing fancy. . .just (xxx) xxx-xxxx
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

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

    Re: Format List Box (2002 SP-3)

    So what is the Row Source property of the list box now?

  7. #7
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Format List Box (2002 SP-3)

    SELECT tlkpTeams.ID, tlkpTeams.txtFirstName AS [First], tlkpTeams.txtLastName AS [Last], tlkpTeams.txtPhone AS [Hm Phone],
    tlkpTeams.txtCell AS Cell, tlkpTeams.txtEmail AS [E-mail]
    FROM tlkpTeams
    WHERE (((tlkpTeams.noTeamNo) Like [Forms]![frmPrayer_Detail]![cboTeamAssign]));
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

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

    Re: Format List Box (2002 SP-3)

    Change tlkpTeams.txtPhone to

    Format(tlkpTeams.txtPhone,"(000) 000-0000")

  9. #9
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Format List Box (2002 SP-3)

    Sweet!! I didn't even pop a brain cell!
    (although I may be damaging some of yours)
    Thanks Hans!
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

Posting Permissions

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