Results 1 to 3 of 3

Thread: reports with dynamic color

  1. #1
    Join Date
    Jun 2003
    Location
    Bloomington, IN, USA
    Posts
    116

    reports with dynamic color

    I have an executive summary report I am working on, and I am getting stuck on somethign very easy. I have an input form where the user enters wether or not they are on schedule, ahead, in danger of missing a date, or will deffinatly be missing a deadline. this stores a 0,1,2,or 3 in a field.

    This field, as well as the field it is a control for, are in the query that controls the form.

    I need the color of the date fields to change color based on these 4 numbers. Which is easy enough, a simple nested if or a case statement, problem solved. However, it seems that whatever I do, sets the color in the first record, then doesn't ever change, once the first one turns green, all of those dates are highlighted green.

    So I think the main problem is where should I put this code inside of the report?

    Brandon
    Last edited by BMan111; 07-22-2003 at 08:48 AM.

  2. #2
    Join Date
    Feb 2003
    Location
    Earth, USA
    Posts
    81

    Think out of the box

    I may have a solution for you that is somewhat unorthodox. I run into many situations that I have to circumvent the code. Add four "text boxes" (set for desired Fore Color) and associate their control sources to the Date field. Set each text box visible property to False. Overlay each box.

    On the Reports Detail section enter your code in the "On Format" event using nested if or select case. For each selection remember to reset the other three visible properties to false.

    You would think that it would be as easy as setting the ".forecolor" property during this event. I tried it, the compiler did not like that.

  3. #3
    Join Date
    Jun 2003
    Location
    Bloomington, IN, USA
    Posts
    116
    you wanna hear the funny part?

    I did that already :P. I got it to work like 2 min before I went home on friday, and didnt get the chance to post here giving my solution.

    Thanks anyway though.

    Brandon

Posting Permissions

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