Results 1 to 4 of 4

Thread: Format() BUG!?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242

    Arrow

    Hello!

    I have one annoying problem with Format() function.
    I retrieve records from DB and if value of field is 0, the Format() function returns me ".00". Here's the code I use:
    Code:
    Format(!Qty, "##,###.00")
    This is annoying, because if I print the value Format() returns, it's printed just ".00".
    Any suggestions?
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    zvonko.bostjancic@siol.net
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946
    What do you want to get"
    The format function is giving you what you ask for.
    If you want 0 then
    dim x
    x = Format(!Qty, "##,###.00
    if x = ".00" then x = "Whatever"
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Member
    Join Date
    May 2000
    Location
    Canada
    Posts
    52
    Is this what you want?
    Format(!Qty, "##,##0.00")

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    YES! That was what I was looking for.
    Thanks!
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    zvonko.bostjancic@siol.net
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

Posting Permissions

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



Click Here to Expand Forum to Full Width