Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
.Ilya said:intermittency (if that's the right word, if not - I claim the credit for inventing it ..
=DODEFAULT()
LOCAL lcAlias, lcFiedldName, lnBuffermode , lnFldState, lcType, llOK, lnSelect,lNewRecProp
=_ObjectProperties(thisform,this)
this.BackColor = this.oldbackcolor
lNewRecProp = .F.
IF PEMSTATUS(ThisForm,'lNewRecord',5)
lNewRecProp = .T.
*=MESSAGEBOX("lNewRecordProperty")
ENDIF
lcAlias = ""
IF !EMPTY(this.ControlSource) AND ! 'THISFORM' $ UPPER(this.ControlSource)
lcType = TYPE( This.ControlSource )
DO case
CASE lcType = 'C'
IF ALLTRIM(this.Value) == ALLTRIM(this.uOldvalue)
* voorlopende spaties weggooien
this.Value = ALLTRIM(this.Value)
llOK = .T.
ENDIF
CASE lcType = 'N'
IF this.Value = this.uOldvalue
llOK = .T.
ENDIF
ENDCASE
IF llOK
IF '.' $(this.ControlSource)
lcAlias = JUSTSTEM(this.ControlSource)
ENDIF
lcFieldName = JUSText(this.ControlSource)
IF !EMPTY(lcAlias)
lnSelect = SELECT()
SELECT (lcAlias)
lnBuffermode = CURSORGETPROP("Buffering")
SELECT (lnSelect)
ELSE
lnBuffermode = CURSORGETPROP("Buffering",lcAlias)
ENDIF
IF lNewRecProp
IF lnBuffermode > 1
IF !EMPTY(lcAlias)
lnFldState = GETFLDSTATE(lcFieldName,lcAlias)
IF !Thisform.lNewRecord AND (lnFldState = 2 OR lnFldState = 4)
SETFLDSTATE(lcFieldName,ICASE(lnFldState=4,3,lnFldState=2,1),lcAlias)
ENDIF
ELSE
lnFldState = GETFLDSTATE(lcFieldName)
IF !Thisform.lNewRecord AND (lnFldState = 2 OR lnFldState = 4)
SETFLDSTATE(lcFieldName,ICASE(lnFldState=4,3,lnFldState=2,1))
ENDIF
ENDIF
ENDIF
ELSE
IF lnBuffermode > 1
IF !EMPTY(lcAlias)
lnFldState = GETFLDSTATE(lcFieldName,lcAlias)
IF (lnFldState = 2 OR lnFldState = 4)
SETFLDSTATE(lcFieldName,ICASE(lnFldState=4,3,lnFldState=2,1),lcAlias)
ENDIF
ELSE
lnFldState = GETFLDSTATE(lcFieldName)
IF lnFldState = 2 OR lnFldState = 4
SETFLDSTATE(lcFieldName,ICASE(lnFldState=4,3,lnFldState=2,1))
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
this.BackColor = this.OldBackcolor
IF this.lRequired AND EMPTY(this.Value)
this.BackColor = RGB(40,200,225 )
ENDIF