Results 1 to 2 of 2
  1. #1
    LindaOSU is offline Novice
    Windows XP Access 2000
    Join Date
    Dec 2010
    Posts
    1

    Condition Formatting, Change Color Of Text If Values Are Different


    We have a table that is updated monthly from a CD. I already have a report that pulls only certain fields from the changed records. There are 5 fields that have a Pre and a Post we want to compare. Pre1 to Post1, Pre2 to Post2 up to Pre5-Post5. Within a single record, any of these pairs maybe be updated. So, for example, a record could have:

    Pre1: 1030
    Post1: 1030
    Pre2: LamoTRIGine
    Post2: lamoTRIgine
    Pre3: YES
    Post3: NO
    Pre4: null
    Post4: Penicillin
    Pre5: YES
    Post5: YES

    For this record, pre2-post2, pre3-post3, pre4-post4 would be considered "changed". I would like these fields to have red text in the report. Is there a case statement that would work? The capitalization (Tallman lettering) is important also. I have the query that pulls out the Tallman lettering changes but can these changes be printed in red also? I want only the changed pair(s) to be in red, not the whole record. All these are Text fields, no Numbers or Dates.

    Thank you.
    LindaOSU

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    As answered elsewhere:

    Generally speaking this should be fairly easy. In Conditional Formatting, using Expression Is, a test like

    [Pre1] <> [Post1]

    should work. The tricky part is the case bit, but check out StrComp() in help and see if it works for you.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Using an event to change color of text.
    By michaeljohnh in forum Programming
    Replies: 3
    Last Post: 08-30-2010, 12:30 PM
  2. Replies: 3
    Last Post: 07-05-2010, 10:46 PM
  3. Change the text box color on form load
    By mikec in forum Programming
    Replies: 2
    Last Post: 03-01-2010, 11:47 PM
  4. Replies: 0
    Last Post: 11-13-2009, 10:18 AM
  5. Change as per condition font color
    By miziri in forum Programming
    Replies: 1
    Last Post: 08-20-2009, 04:23 AM

Tags for this Thread

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