Information générale
Catégorie:
Codage, syntaxe et commandes
>>>>I'd like to make it more generic by using a variable to enter the coloring but I always get an "Invalid expression in the Dynamic...."
>>>>The variable is a property of the grid and the something = something is properly evaluated as they are properties of the grid too.
>>>>
>>>>THIS.gnForeColor = some valid color value
>>>>
>>>>Example: IIF(something = something, THIS.gnForeColor, ........
>>>>
>>>These variables seem to need a wider scope...try it as a form property.
>>
>>Hi Bruce,
>>
>>I'll give that a try but why would the evaluated expression understand "THIS" being in the grid but not the color properties? IIF(RECNO(THIS.RecordSource) = THIS.gnLastRec, color, color) - The statement understands THIS.RecordSource and THIS.gnLastRec just fine, it just doesn't do the colors unless I have the RGB funtion included.
>>
>
>Good question...I had trouble with it too...all I'm sure of is that it works for me as a form property (I also have "gnLastRec" at the form level, that wouldn't work for me locally. I've only had success with everything at the form scope level...
Putting them at the form level is an item on my "to do" list for today. Thanks and I'll try it.
Steve
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement