Welcome to SPN

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

Sign Up Now!

Formatting a Query

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

  1. red6000

    red6000
    Expand Collapse
    Guest

    Hi, I have a query from a table which counts records.

    The query result is mainly full of zeros in the many columns. Is there a
    way to do some conditional formating so that the records with a value >0 are
    highlighted in some way?

    Would be great is I could have:

    records of 0 = white
    records of 1-5 = green
    6-10 = amber
    >10 = red.


    Many thanks.

    Steve
     
  2. Loading...

    Similar Threads Forum Date
    Query about Jhatka Meat by Shooting in Head Sikh Sikhi Sikhism Aug 26, 2011
    Who is a sikh? A non sikh friend's query!! Sikh Sikhi Sikhism Apr 30, 2010
    General Query Hard Talk Sep 4, 2008
    Power of pauri's in Japji Sahib query Sikh Sikhi Sikhism Aug 17, 2006
    Sikhism a query Book Reviews & Editorials Aug 2, 2005

  3. Rick Brandt

    Rick Brandt
    Expand Collapse
    Guest

    red6000 wrote:
    > Hi, I have a query from a table which counts records.
    >
    > The query result is mainly full of zeros in the many columns. Is
    > there a way to do some conditional formating so that the records with
    > a value >0 are highlighted in some way?
    >
    > Would be great is I could have:
    >
    > records of 0 = white
    > records of 1-5 = green
    > 6-10 = amber
    > > 10 = red.

    >


    The standard format property in a table or query can give you four differetn
    colors of output, but the break-points are Null, Zero, Positive, Negative. For
    example...
     
  4. Rick Brandt

    Rick Brandt
    Expand Collapse
    Guest

    red6000 wrote:
    > Hi, I have a query from a table which counts records.
    >
    > The query result is mainly full of zeros in the many columns. Is
    > there a way to do some conditional formating so that the records with
    > a value >0 are highlighted in some way?
    >
    > Would be great is I could have:
    >
    > records of 0 = white
    > records of 1-5 = green
    > 6-10 = amber
    > > 10 = red.

    >
    > Many thanks.
    >
    > Steve



    The standard format property in a table or query can give you four different
    colors of output, but the break-points are Positive, Negative, Zero, and Null.
    For
    example...

    0[Green];-0[Red];0[Black];"Null"[Blue]

    ....will show positive values in green, negative in red, zero in black, and the
    word "Null" in blue.

    To get the breakpoints that you want you would have to use Conditional
    formatting on a form or report or use code in the format event of a report.
    Actually I don't know if Conditional Formatting supports as many breaks as you
    want, but code in a report would definitely work.

    --
    Rick Brandt, Microsoft Access MVP
    Email (as appropriate) to...
    RBrandt at Hunter dot com
     
  5. red6000

    red6000
    Expand Collapse
    Guest

    Thanks Rick,

    without sounding really thick, how to I switch on that standard formatting
    as I might just settle for that.

    cheers


    "Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
    news:FJ6ug.66310$fb2.53996@newssvr27.news.prodigy.net...
    > red6000 wrote:
    >> Hi, I have a query from a table which counts records.
    >>
    >> The query result is mainly full of zeros in the many columns. Is
    >> there a way to do some conditional formating so that the records with
    >> a value >0 are highlighted in some way?
    >>
    >> Would be great is I could have:
    >>
    >> records of 0 = white
    >> records of 1-5 = green
    >> 6-10 = amber
    >> > 10 = red.

    >>
    >> Many thanks.
    >>
    >> Steve

    >
    >
    > The standard format property in a table or query can give you four
    > different
    > colors of output, but the break-points are Positive, Negative, Zero, and
    > Null. For
    > example...
    >
    > 0[Green];-0[Red];0[Black];"Null"[Blue]
    >
    > ...will show positive values in green, negative in red, zero in black, and
    > the word "Null" in blue.
    >
    > To get the breakpoints that you want you would have to use Conditional
    > formatting on a form or report or use code in the format event of a
    > report. Actually I don't know if Conditional Formatting supports as many
    > breaks as you want, but code in a report would definitely work.
    >
    > --
    > Rick Brandt, Microsoft Access MVP
    > Email (as appropriate) to...
    > RBrandt at Hunter dot com
    >
    >
    >
     
  6. Rick Brandt

    Rick Brandt
    Expand Collapse
    Guest

    red6000 wrote:
    > Thanks Rick,
    >
    > without sounding really thick, how to I switch on that standard
    > formatting as I might just settle for that.


    Just enter...

    0[Green];-0[Red];0[Black];"Null"[Blue]

    ....into the format property of that column in your query adjusting the colors
    for what you want.

    --
    Rick Brandt, Microsoft Access MVP
    Email (as appropriate) to...
    RBrandt at Hunter dot com
     
  7. red6000

    red6000
    Expand Collapse
    Guest

    Ahh, right, I have to do it for each column.

    I see. Actually that will do for what I wanted really.

    Thanks for the patience.

    "Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
    news:L47ug.66320$fb2.51823@newssvr27.news.prodigy.net...
    > red6000 wrote:
    >> Thanks Rick,
    >>
    >> without sounding really thick, how to I switch on that standard
    >> formatting as I might just settle for that.

    >
    > Just enter...
    >
    > 0[Green];-0[Red];0[Black];"Null"[Blue]
    >
    > ...into the format property of that column in your query adjusting the
    > colors for what you want.
    >
    > --
    > Rick Brandt, Microsoft Access MVP
    > Email (as appropriate) to...
    > RBrandt at Hunter dot com
    >
     

Share This Page