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!

I trying again but nothing...

Status
Not open for further replies.

bigdad

Programmer
Jul 17, 2001
34
VE
hi is me, bigdad again:

I trying to use the DynamicForecolor again with the IIF() but nothing. My problems is with a date in specific. How I can do the expression to evaluate with IIF() if a date is empty (ctod("")).

If somebody can helpme be wellcome, please is urgent!!!
 
I have never heard of DynamicForecolor. It isn't a property is it ?

Let me see if I can interpret your statement.
You are trying to change the Forecolor property of a textbox assigned to a date field depending upon whether or not the date is blank.

If so, assign the forecolor in the refresh method or the lostfocus method.

Don
dond@csrinc.com

 
Here is a sample of the use of a dynamicforecolor:

I put this in the grid class's Init()

THIS.SETALL("DynamicBackColor", "IIF(RECNO(THIS.RecordSource) = THIS.rec_no, 8388608, 16777215)", "Column")
THIS.SETALL("DynamicForeColor", "IIF(RECNO(THIS.RecordSource)= THIS.rec_no, 16777215, 0)", "Column")

So in your case, you could try it with your empty date.

THIS.SETALL("DynamicBackColor", "IIF(EMPTY(MyDateField), 8388608, 16777215)", "Column")
THIS.SETALL("DynamicForeColor", "IIF(EMPTY(MyDateField), 16777215, 0)", "Column")

HTH, Weedz (Wietze Veld) They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best. - Steve McConnell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top