Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function for checking for changes in a writable cursor
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00524334
Message ID:
00524376
Views:
15
>>>If I have a cursor, let's call it sklcurs, and the fields are bound to a number of controls on a form, is there a way to know if as few as one field's value has changed as a result of changing it in the form control it's bound to without writing a piece of code to each control?
>>>
>>>thanks in advance for the suggestions.
>>>
>>>JE
>>
>>If you're using a buffered table, compare the current field value to the OLDVAL().
>
>Rereading your request, perhaps GETFLDSTATE() is more appropriate
>
>
>IF "2" $ GETFLDSTATE(-1,"sklcurs")
>  At Least One Field Has Changed
>ENDIF
>
>
>If you're looking at a new record, you'll look for a "4" in GETFLDSTATE(-1,"sklcurs")

Just look for the existence of anything other than 1.

!empty(chrtran(getfldstate(-1,"sklcurs"),"1","")) && return if existing record was modified/deleted or new record added
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform