Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

thank`s but nothing. I`m trying

Status
Not open for further replies.

bigdad

Programmer
Jul 17, 2001
34
VE
thank`s but nothing. I`m trying to use that with the DynamicForecolor. I don`t know how I can`t use that one in case that a date of my table is empty. The DynamicForecolor as DynamicBackcolor use IIF + a expression to evalue. Here is an example:

thisform.grdtotales.SetAll("DynamicBackColor", "IIF(MOD(RECNO( ), 2)=0, RGB(255,255,255), RGB(0,255,0))", "Column") && this take turns the records between white and green.

When "IIF(MOD(RECNO( ), 2)=0" is the expression to evalue to take turns the records between white and green.

My point is how Can I do to use a expression just like that in case of some records date of a especif table are empty

thank`s all of you
bigdad
 
Hi,

1. Just a little observation... BEWARE that the MOD(recno(),2) need not bring alternate records in white and green. The reason is that ... this will work if the index key and so the display order is the same as record number sequence. Otherwise.. the recno() will not be the display sequence.. So some blocls could be green and some blocks could be white. At the end, this will look odd.......

2. Regarding empty date field..

thisform.grdtotales.SetAll("DynamicBackColor", "IIF(EMPTY(myDateField), RGB(255,255,255), RGB(0,255,0))", "Column")

or

thisform.grdtotales.SetAll(&quot;DynamicBackColor&quot;, &quot;IIF(myDateField < CTOD(&quot;01/01/00&quot;, RGB(255,255,255), RGB(0,255,0))&quot;, &quot;Column&quot;)

or some such conditional checking will give you the result.

Hope this helps



ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Assuming you still want the whole row to be the same color, change the expression to something like:
&quot;IIF(empty(mytable.mydate), RGB(255,255,255), RGB(0,255,0))&quot;

IF you only want thast given field to change colors, then instead of using the setall() method, you'd just set the given column's DynamicBackColor to this value.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top