Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Backround Colour based on Lookup value help
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

8 Posts

Posted - 01/18/2013 :  07:06:45  Show Profile  Reply with Quote
I have a table displaying dates from 2 different datasets, this works great

but I need the backround of the columns to change depending on the date value. This is my query

=IIF(DateDiff("d", Lookup(Fields!BrigID.Value,Fields!BrigID.Value,Fields!flddDRIVTrainDate.Value, "Base1Shared"), Now())>1095,"Red","no color")

So if the date value is more than 3 years old from when the report is run the backround goes red and I know that one of the staff needs to complete a course.

The trouble is that this code works but also seems to remove the text colour as well

Any help would be greatful

Starting Member

8 Posts

Posted - 01/18/2013 :  07:08:41  Show Profile  Reply with Quote
Sorry Posted in the wrong forum

Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 01/18/2013 :  07:19:58  Show Profile  Reply with Quote
If the expression is on the BackgroundColor field, then the text color should not change. Could it be that it is not visible because it is immersed in red? You might try adding another expression to the Color field to change it from black to white/no color.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000