Hi, buddies. I gave up. :-(
It's happening something too much weird here, and I'm don't undestanding.
I have a form with a Grid Control. This grid's recordsource is a updatable cursor.
One field of this cursor show a sequential number.
The desired behavior of my grid is, when a user to click in a button which is in a row where the sequential number is 3 (for example), the records 2 and 1 (in this example) should have a boolean field filled with .T.
Well, that's easy. I need a UPDATE.
I have the following code to do that:
** first I put .F. to all records
UPDATE curProdutividade SET lProgramar = .F.
** Then I put .T. to all record where the sequential number is minor than the selected record.
UPDATE curProdutividade SET lProgramar = .T. WHERE iFase <= liFase
So, here comes the weird thing. If I have the sequential records 1, 2, 3, 4 and 5, and I clik in 3, it put .T. in 1, 2, 3 and 5 (?!?). So, it allways put .T. in all sequential minors and also in the last record.
Another weird fact is that the statement to set all as .F. don't work. However, if I suspend the execution in line just below of statement, and type it in vfp's command line, it works.
Once more: If I issue a BROWSE between UPDATE statement for all records and UPDATE statement for records in my condition, and close this browse, the program carry on and do everything fine. However, if I put BROWSE NOWAIT, it doesn't work.
Anybody already saw that?
Obs.: I already try put REPLACE ALL, SCAN with REPLACE, but nothing works.
Thanks in Advance.
Claudio Lassala