Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Apr 2002
    Location
    Northern Territory, Australia
    Posts
    471
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Change colour of text in Report if date overdue (97)

    Hello there

    I am sure I have seen somewhere that this can be done, but you know what it's like.. when you want that something you saw, you cant find it!!

    In my report I want to have the field called "Due Date". I want the text to be Red if the date is equal to or less than to todays date. (meaning overdue) If colour is not possible, bold or underline?

    Is this possible?

    Regards

    Kerry <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change colour of text in Report if date overdue (97)

    In the On Format of the detail enter the following code :
    <pre>If Me.[Due Date] <= Now() Then
    Me.Myfield.ForeColor = VbRed
    Else
    Me.Myfield.ForeColor = VbBlack
    End If</pre>

    Replace Myfield with the name of the field you want to be red.
    Francois

  3. #3
    4 Star Lounger
    Join Date
    Apr 2002
    Location
    Northern Territory, Australia
    Posts
    471
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Re: Change colour of text in Report if date overdue (97)

    Thankyou Francois

Posting Permissions

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