Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Sep 2003
    Location
    Ocean Gate, New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditional Formatting and a VBA questions (A2K)

    Hello,

    I am hoping someone can help me or lead me in the right direction. I have attached a stripped down database for your use in helping with my questions.

    In report "Rpt Employee TCH Info", using employee number 8, I have conditionally formatted Training Hours Needed (text34 and text36) so that condition 1 reads "FIELD VALUE IS GREATER THAN 0". When viewing employee number 8, I get conditionally formatted numbers of -3.5 and -1.5, which is LESS THAN 0, in the same font and color as if the criteria did not meet the formatting requirements.

    This leads to my questions. How would I go about it so that when Training Hours Needed reaches 0 either the sum remains at 0 or the negative numbers become transparant.

    Thank you in advance for any help.
    Attached Files Attached Files

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Conditional Formatting and a VBA questions (A2K)

    You said the conditional formatting condition 1 reads "FIELD VALUE IS GREATER THAN 0". Well, -3.5 DOESN'T meet this criteria! it is less than 0, as you pointed out. So what is your problem?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Star Lounger
    Join Date
    Sep 2003
    Location
    Ocean Gate, New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Formatting and a VBA questions (A2K)

    Hello Mark,

    Thanks for the speedy reply.

    I guess my problem is I am only looking for positive numbers to be formatted only. If you look at employee number 294 you will see training hours are still needed where employee number 8 has met his required amount of training hours and is over by 3.5 hrs. The 3.5 hours in effect is less than 0 not greater than.

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Conditional Formatting and a VBA questions (A2K)

    Quite frankly, your report doesn't match your narrative. I couldn't find any conditional formatting on any of the controls in the report. And in your original post you mentioned values of -3.5 and -1.5, but I didn't find any negative values for Employee #8.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    Star Lounger
    Join Date
    Sep 2003
    Location
    Ocean Gate, New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Formatting and a VBA questions (A2K)

    I apoligize I thought I explained in my original post that the conditional formatting was applied to text box 34 and text box 36 which appear next to the "TRAINING HOURS NEEDED" label. Then if you view the report for employee number 8 you will see a -3.5 and a -1.5 in red font.

  6. #6
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Conditional Formatting and a VBA questions (A2K)

    Sorry, I hadn't scrolled down far enough.

    It is odd what it is doing. However, I was able to make a change to get it to work properly. Instead of checking the field value in the conditional formatting, I set the Condition 1 to:
    Expression Is ([Total TCH Required Water]-Sum([TCH Received Water])) > 0
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  7. #7
    Star Lounger
    Join Date
    Sep 2003
    Location
    Ocean Gate, New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Formatting and a VBA questions (A2K)

    Mark,

    That worked perfectly !

    Thanks for the help.

Posting Permissions

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