>Hi all,
> I don't know how to put this in English, so I'll describe the scenario and what I wish to do. Hope that help and any comments, suggestions are welcome.
> TIA.
>
> Scenario: I have a column in a grid which contains a container. Inside this container, there are 2 TextBox controls for 2 different date input.
>
> Wish to do: I would like to change the forecolor of the textbox if the date entered is in the future or invalid. Note: Only affects textbox that contains the invalid date. But not the whole column.
>
> What I am doing now: Set the Grid.Column(n).DynamicForeColor = IIF(lInvalid, RGB(255,0,0),RGB(0,0,0)). The forecolor is not changing.
>
>
>Thanks in Advance again.
>
>
>Sian Soon
1. Your IIF() statement
MUST contain record-oriented expression.
2.DynamicForeColor is a String Expression, Notice that there is NO SPACE left inside "
e.g.
Grid.Column(n).DynamicForeColor =
"IIF(myTable.myDate>Date(), RGB(255,0,0),RGB(0,0,0))
"Above will work fine but
Grid.Column(n).DynamicForeColor =
"IIF(myTable.myDate>Date(), RGB(255,0,0),RGB(0,0,0))
"as there is a SPACE after the close ) , it can't work!
If you have decided the field as date format, illegal date will be automated blocked and need user to fill correctly!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.