Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Nov 2008
    Location
    Yerushalayim, Italy
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a formula giving me a numerical result in my query. I want to put a conditional format on it so that if the result is greater than "x" the result shows in red. Is this possible in a query (I know how to do it in a report)? Help!

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    Unfortunately conditional formatting only works with forms and reports. Create a form that is in the datasheet mode using your query as the data source and use conditional formatting to achieve the effect you are after.

    UPDATE The approach suggested by Mark below yeilds something very similar to conditional formatting in a query (or in a table I suspect), and uses the numeric formatting options.
    Wendell

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts
    Quote Originally Posted by Deb22 View Post
    I have a formula giving me a numerical result in my query. I want to put a conditional format on it so that if the result is greater than "x" the result shows in red. Is this possible in a query (I know how to do it in a report)? Help!
    With the query open in Design Mode, select that field in the QBE grid and use the Format property. Try making it: 0[Black];0[Red];0[Black]
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    That's a trick I didn't know - thanks Mark. So my reply is not correct - I'll edit it accordingly.
    Wendell

  5. #5
    New Lounger
    Join Date
    Nov 2008
    Location
    Yerushalayim, Italy
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by WendellB View Post
    Unfortunately conditional formatting only works with forms and reports. Create a form that is in the datasheet mode using your query as the data source and use conditional formatting to achieve the effect you are after.

    UPDATE The approach suggested by Mark below yeilds something very similar to conditional formatting in a query (or in a table I suspect), and uses the numeric formatting options.

  6. #6
    New Lounger
    Join Date
    Nov 2008
    Location
    Yerushalayim, Italy
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Wendell and Mark. I will try that solution when I get to work tomorrow.

Posting Permissions

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