>AFAIK all the Dynamic properties are executes via Execscript() or macro expansion, IOW small programs created on the fly. My guess is that these small programs don't see the #define, since #defines must always be inside the program that use them.
>
>Have you tried to use variables instead, like lcActiveForeCol = ACTIVEROWFORECOL? I am curious to hear your conclusion..
using varibles results in the usual error with Dynamic's
Rgds,
Koen
>
>>Hi,
>>
>>I would like to make use of constants to set my grids colours, have therefore issued :
>>
>>
>>#DEFINE ACTIVEROWFORECOL 16711680
>>#DEFINE ROWFORECOL 0
>>This.SetAll( 'DynamicForeColor', ;
>> 'IIF( RECNO( This.RecordSource ) = This.nRecNo, ACTIVEROWFORECOL, ROWFORECOL )', 'COLUMN' )
>>
>>
>>errors
>>
>>wheras
>>
>>This.SetAll( 'DynamicForeColor', ;
>> 'IIF( RECNO( This.RecordSource ) = This.nRecNo, 16711680, 0 )', 'COLUMN' )
>>
>>
>>works smouthly
>>How should I correct my statement using #DEFINE?
>>
>>Rgds,
>>
>>Koen