Albert:  I have no idea why mine wouldn't stick when I did it as an
exit from that field (is that where you have that code?).  At first I tried
using the variable (vUnit = UnitPrice) but because I have "SET ZERO ON",
the variable evaluated as a 0 even if it was null.  I didn't want to turn 
the
setting on and off, and a value of 0 was a valid value that would not get
a change of color.  So I needed to distinguish between a null and a zero.
The "getproperty" worked nicely because it would grab a null into a text
variable.

Karen
       
 
>   It worked when I put a similar on an INTEGER field. Here is the actual 
> code where I test the invoice number. I tabbed out of the field, and the 
> white stuck after I entered a valid invoice number. I have a form 
> variable set to fInvNo = ReceiptsInvNo - maybe that is another way of 
> doing it that works.
> 
> Albert
> 
> SELECT COUNT(*) INTO fCount FROM Invoices WHERE InvNo = .fInvNo
> IF fCount = 0 THEN
>      PROPERTY cReceiptsInvNo COLOR "RED"
>      PAUSE 1 USING "Invalid Invoice Number - Please Check Again" +
>        CAPTION "OOOPS!" +
>        AT CENTER CENTER
>      PROPERTY cReceiptsInvNo set_focus "True"
>      GOTO Stop
>    ELSE
>      PROPERTY cReceiptsInvNo COLOR "WHITE"
> ENDIF

Reply via email to