Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditional formatting (2000(SP3))

    Is it possible to apply conditional formatting to a field in a report if part of the string meets the condition?

    I have a report that prints out a calculated field - Details - that is made up of a category grouping plus the various detail info associated with the category:
    e.g. "Documents - Passport" or "Financial - Banking". Occasionally one of the workers manages to circumvent the various checks put in place to control them and manages to leave the detail ( in these examples passport and banking) out in which case the query puts in the phrase "Not Recorded Properly". In the original report, I have conditional formatting that looks for "Not Recorded Properly" and formats it in red and underlines it so the supervisor can see where the problems are.

    On this new report, because of the newly combined fields, I need to search for a partial string rather than the whole string.e.g. "Documents - Not Recorded Properly" or "Banking - Not recorded Properly". I've got as far as deciding that I need to use "Expression Is" in the conditional formatting dialogue, but don't know how to construct the expression. I played around with the InStr function and looked at InStrRev but am stuck on how to feed the info to the function. <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

    Of course, if the pesky users would record things properly, I wouldn't have to do this...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conditional formatting (2000(SP3))

    Enter an expression like this in the Expression Is box:
    <code>
    InStr([Details],"Not Recorded Properly")>0
    </code>
    InStr will return 0 if the search string is not found, and a number > 0 if the search string is found.

  3. #3
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional formatting (2000(SP3))

    That did it. Thanks so much Hans. <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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