Results 1 to 8 of 8
  1. #1
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305

    Help with conditional formatting expression

    I've got a somewhat complex conditional formatting question.



    I'm looking to format textbox1 based on the value of textbox2. If textbox2's value is between 0 and (.1), then I want the formatting to kick in for textbox1.

    I tried using 'expression is' and then the following:

    Code:
    [textbox2]>=(0.1) And [textbox2]<0
    But nothing is happening. Any suggestions?

  2. #2
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    How can it be greater than 0.1 and less than 0 ? You want greater than 0 and less than or equal to 0.1 no?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305
    I'm looking for it to capture values that are less than 0 but more than negative 10%

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    Quote Originally Posted by Micron View Post
    How can it be greater than 0.1 and less than 0 ? You want greater than 0 and less than or equal to 0.1 no?

    Thank you Micron, that has brightened my day.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Then you're missing the minus sign?

    [textbox2]>= -0.1 And [textbox2]<0
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305
    Quote Originally Posted by Micron View Post
    Then you're missing the minus sign?

    [textbox2]>= -0.1 And [textbox2]<0
    Gotcha. I was using parenthesis on accident. Thank you!

  7. #7
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    The parentheses were of no consequence I'd say. It was the missing minus sign, no?
    Anyway, glad to help with an easy one!
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305
    Yes it was the missing sign. I'm so used to using parenthesis to represent negative #s that I forgot that doesn't work with functions. Thanks!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 02-02-2022, 03:28 PM
  2. Conditional formatting expression
    By SunTop in forum Forms
    Replies: 3
    Last Post: 11-08-2016, 09:21 AM
  3. Replies: 6
    Last Post: 08-30-2016, 05:43 AM
  4. Access Form Conditional Formatting Expression
    By mrmmickle1 in forum Programming
    Replies: 1
    Last Post: 08-03-2016, 02:01 PM
  5. conditional formatting expression
    By kroenc17 in forum Programming
    Replies: 2
    Last Post: 10-22-2010, 09:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums