I am using property commands, called by an on row entry eep, in a scrolling region to:

1.  Change the color of the customer field in the focused row
2.  Check the order history, and if one exists, change the color of a
     history push button to alert user of a history file for the focus row.

Code goes like this

SET VAR vHisChk Integer = 0
SET VAR vHisChk = Refnum in OrdHistory where Refnum = .Vrefnum
IF vHisChk = .Vrefnum THEN
  PROPERTY idHisory FONT_COLOR 'RED'
  PROPERTY idCusname FONT_COLOR 'RED'
  RETURN
ENDIF
PROPERTY idHistory FONT_COLOR 'BLACK'
PROPERTY idCusname FONT_COLOR 'RED'
RETURN

Then I use an on close eep to set everything back to normal.


What happens is this:

If NO history exists, Customer field changes to RED as expected,
ONLY in the focused row. (That is what I wanted)
History button remains black


However:

If a history DOES exist, Customer field changes to RED in EVERY row
History button changes to RED in EVERY row



At first I thought that the cusname being a field, while the history button is a variable,
might cause it. But it works perfectly on the single row if there is no history.
So if this theory is correct, why does it change ALL rows if there is a history.


This makes no sense to me.  I must be doing something wrong.

Any ideas?

Dick Fey
Carpet Broker Inc.



Reply via email to