Results 1 to 3 of 3
  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

    Number formatting (code) (2002 SP-2)

    I have a bit of code used to e-mail a customer showing confirmation of delivery. They now would like to have some numeric data appear in the body of the e-mail, but I'm having a hard time trying to figure out how to format the numbers (please see attachment). As always, any input/advise greatly appreciated. BTW, there is an attachment to the e-mail that already has all the information properly formatted in a report, but they're too <img src=/w3timages/censored.gif alt=censored border=0> to be bothered with opening it.
    Attached Files Attached Files
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

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

    Re: Number formatting (code) (2002 SP-2)

    Replace Me.lngWeight by Format(Me.lngWeight, "#,##0") and Me.txtGallons by Format(Me.txtGallons, "#,##0.00")
    You can look up the Format property in the online help to learn about the codes you can use in the format string. In these examples:
    # = digit, may be omitted
    0 = digit, always displayed
    , = thousands separator
    . = decimal separator

  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: Number formatting (code) (2002 SP-2)

    Hans:

    Thanks once again. I had tried using (Format Property > Custom Formats) from the help menu, but kept getting syntax error messages. I thought maybe the help didn't apply to code, but now I see where I had neglected to preface the statements with "Format" and I also left the " [ " brackets in and not " ( " Thanks for your help, all is well!
    <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>
    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
  •