Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Blank if zero in a listbox

Discussion in 'Information Technology' started by Paul Burdett, Jul 28, 2006.

  1. Paul Burdett

    Paul Burdett
    Expand Collapse
    Guest

    Hi Guys

    I am populating a listbox from a table using an SQL statement.

    One column is currency.

    I want to show zero values as blank, not zero. I want to show none blank as
    usual currency format.

    Is there a format command I can use?

    Thanks in advance.

    Paul
     
  2. Loading...

    Similar Threads Forum Date
    USA Utah Sikhs bring warmth to homeless with blanket donation Breaking News Dec 21, 2013
    History The Art of Firing Blanks: Jaswant Singh and the BJP Punjab, Punjabi, Punjabiyat Aug 25, 2009
    Sikh News Security blanket over Punjab as dera deadline draws close (IANS via Yahoo! India News Breaking News May 27, 2007
    Opinion Zero Sum Game And National Social Fabric Sikh Sikhi Sikhism Dec 25, 2016
    Legal Commemorating International Day of Zero Tolerance to Female Genital Mutilation Breaking News Feb 6, 2011

  3. Al Camp

    Al Camp
    Expand Collapse
    Guest

    Paul,
    Formatting the field with...
    $ #.00;-$ #.00,""
    should do it.
    A format can have 4 arguments... seperated by ";"

    Section Description...
    First The format for positive numbers.
    Second The format for negative numbers.
    Third The format for zero values.
    Fourth The format for Null values.

    --
    hth
    Al Camp
    Candia Computer Consulting - Candia NH
    http://home.comcast.net/~cccsolutions


    "Paul Burdett" <paul@burdettp.freeserve.co.uk> wrote in message
    news:OCcHtyIkGHA.1600@TK2MSFTNGP04.phx.gbl...
    > Hi Guys
    >
    > I am populating a listbox from a table using an SQL statement.
    >
    > One column is currency.
    >
    > I want to show zero values as blank, not zero. I want to show none blank as usual
    > currency format.
    >
    > Is there a format command I can use?
    >
    > Thanks in advance.
    >
    > Paul
    >
     
  4. Paul Burdett

    Paul Burdett
    Expand Collapse
    Guest

    Hi Al

    Many thanks for this.

    So how does this look in the SQL?

    Format(FieldName, $ #.00;-$ #.00,"")?

    This gives me blanks everywhere when I try it. Am I doing something wrong?

    Also being software used outside the USA, how would I pick up the local
    denomination symbol?

    Regards Paul


    "Al Camp" <anon@anon.net> wrote in message
    news:eZgIQNJkGHA.4504@TK2MSFTNGP05.phx.gbl...
    > Paul,
    > Formatting the field with...
    > $ #.00;-$ #.00,""
    > should do it.
    > A format can have 4 arguments... seperated by ";"
    >
    > Section Description...
    > First The format for positive numbers.
    > Second The format for negative numbers.
    > Third The format for zero values.
    > Fourth The format for Null values.
    >
    > --
    > hth
    > Al Camp
    > Candia Computer Consulting - Candia NH
    > http://home.comcast.net/~cccsolutions
    >
    >
    > "Paul Burdett" <paul@burdettp.freeserve.co.uk> wrote in message
    > news:OCcHtyIkGHA.1600@TK2MSFTNGP04.phx.gbl...
    >> Hi Guys
    >>
    >> I am populating a listbox from a table using an SQL statement.
    >>
    >> One column is currency.
    >>
    >> I want to show zero values as blank, not zero. I want to show none blank
    >> as usual currency format.
    >>
    >> Is there a format command I can use?
    >>
    >> Thanks in advance.
    >>
    >> Paul
    >>

    >
    >
     
  5. Al Camp

    Al Camp
    Expand Collapse
    Guest

    "Paul Burdett" <paul@burdettp.freeserve.co.uk> wrote in message
    news:ORlyFvTkGHA.4224@TK2MSFTNGP05.phx.gbl...
    > Hi Al
    >
    > Many thanks for this.
    >
    > So how does this look in the SQL?
    >
    > Format(FieldName, $ #.00;-$ #.00,"")?
    >
    > This gives me blanks everywhere when I try it. Am I doing something wrong?
    >
    > Also being software used outside the USA, how would I pick up the local denomination
    > symbol?
    >
    > Regards Paul
    >
    >
    > "Al Camp" <anon@anon.net> wrote in message news:eZgIQNJkGHA.4504@TK2MSFTNGP05.phx.gbl...
    >> Paul,
    >> Formatting the field with...
    >> $ #.00;-$ #.00,""
    >> should do it.
    >> A format can have 4 arguments... seperated by ";"
    >>
    >> Section Description...
    >> First The format for positive numbers.
    >> Second The format for negative numbers.
    >> Third The format for zero values.
    >> Fourth The format for Null values.
    >>
    >> --
    >> hth
    >> Al Camp
    >> Candia Computer Consulting - Candia NH
    >> http://home.comcast.net/~cccsolutions
    >>
    >>
    >> "Paul Burdett" <paul@burdettp.freeserve.co.uk> wrote in message
    >> news:OCcHtyIkGHA.1600@TK2MSFTNGP04.phx.gbl...
    >>> Hi Guys
    >>>
    >>> I am populating a listbox from a table using an SQL statement.
    >>>
    >>> One column is currency.
    >>>
    >>> I want to show zero values as blank, not zero. I want to show none blank as usual
    >>> currency format.
    >>>
    >>> Is there a format command I can use?
    >>>
    >>> Thanks in advance.
    >>>
    >>> Paul
    >>>

    >>
    >>

    >
    >
     
  6. Al Camp

    Al Camp
    Expand Collapse
    Guest

    Paul,
    Sorry for the blank response.
    My suggestion was referring to the Format Property.
    The Format Function requires quotes around the format.
    Format(FieldName, "$ #.00;-$ #.00, ")?
    (the third format argument contains a space)

    Regarding the foriegn Currency Units... let me try that one, but repost a new question
    if we can't work it out.
    Windows has an accessory app called CharacterMap (CharMap.exe), which will display all
    the characters in a font. For instance, my Arial has a Pound sign, the Ascii equivalent
    of which is 163. So, hold the Alt key down and type 0163 to get that character.
    Alt-0163 = £
    Format(FieldName, "£ #.00;-£ #.00, ")
    or for Francs...
    Format(FieldName, "f #.00;-f #.00, ")

    You'll have to check your fonts to see if any of them contain the currency symbol/s you
    might need. Otherwise, you may have to find a specialty font for foreign currencies. I
    would think $ would be pretty much universal though... at least in the business community.
    --
    hth
    Al Camp
    Candia Computer Consulting - Candia NH
    http://home.comcast.net/~cccsolutions


    "Paul Burdett" <paul@burdettp.freeserve.co.uk> wrote in message
    news:ORlyFvTkGHA.4224@TK2MSFTNGP05.phx.gbl...
    > Hi Al
    >
    > Many thanks for this.
    >
    > So how does this look in the SQL?
    >
    > Format(FieldName, $ #.00;-$ #.00,"")?
    >
    > This gives me blanks everywhere when I try it. Am I doing something wrong?
    >
    > Also being software used outside the USA, how would I pick up the local denomination
    > symbol?
    >
    > Regards Paul
    >
    >
    > "Al Camp" <anon@anon.net> wrote in message news:eZgIQNJkGHA.4504@TK2MSFTNGP05.phx.gbl...
    >> Paul,
    >> Formatting the field with...
    >> $ #.00;-$ #.00,""
    >> should do it.
    >> A format can have 4 arguments... seperated by ";"
    >>
    >> Section Description...
    >> First The format for positive numbers.
    >> Second The format for negative numbers.
    >> Third The format for zero values.
    >> Fourth The format for Null values.
    >>
    >> --
    >> hth
    >> Al Camp
    >> Candia Computer Consulting - Candia NH
    >> http://home.comcast.net/~cccsolutions
    >>
    >>
    >> "Paul Burdett" <paul@burdettp.freeserve.co.uk> wrote in message
    >> news:OCcHtyIkGHA.1600@TK2MSFTNGP04.phx.gbl...
    >>> Hi Guys
    >>>
    >>> I am populating a listbox from a table using an SQL statement.
    >>>
    >>> One column is currency.
    >>>
    >>> I want to show zero values as blank, not zero. I want to show none blank as usual
    >>> currency format.
    >>>
    >>> Is there a format command I can use?
    >>>
    >>> Thanks in advance.
    >>>
    >>> Paul
    >>>

    >>
    >>

    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page