SimplyES, please do a coverage log, as I suggested earlier:
In your code right before APPEND BLANK put
Code:
SET COVERAGE TO ADDBS(GETENV("TEMP"))+"append.log"
APPEND BLANK
Then in the Forms control with lowest tab order and tabstop=.t. in the gotfocus put
to turn off the logging. This part is not that important, it just shortens the log to essential code. You might also put a button on the form and put the SET COVERAGE TO into its click event, so you end the log after you're sure the effect already happened.
Now start all this, close VFP afterward and look at that log to see which code runs. The log doesn't contain the text of the source code but control.method names and line numbers, you might find DBC events triggers functions called in index tags, field-, and table rule calls. And many things of that might move the record pointer. I'm sure you'll see why the record pointer is moved, APPEND BLANK will put it on the new blank record unless an insert trigger prevents creating a new record at all and the record pointer stays put where it was, but that trigger code run would also appear in the coverage log.
There are only slight things not recorded with coverage log, eg all expression evaluations in properties, unless they call into PRGs or methods. You can also get "jumps" in the code you don't expect through timers, BINDEVENTS, there might be something run on assigning an alias to the grid or setting any other properties with assign methods.
The debugger causes many focus-change related events and might cause a fix you don't have when not debugging. Timer events might run and "fix" the issue, just because you debug and you don't see that, because by default the debugger doesn't single step through timer events, that would cause a mess when a timer runs tightly, you won't get to single stepping through the code you want to single step through. In contrast, when you don't debug, all code takes so short no timer event happens, it doesn't run at all, even not invisible.
It's safe to assume it's never APPEND BLANK causing any other record pointer move than that to the new blank record. It has to be insert trigger code or table/field rule or index expressions calling code that could move record pointer.
VFP has tools to read in the coverage log and display timing recorded and what code sections were covered/&executed (therefore its name), but that'll not help you see the order of code as it run that shows by simply looking at the log in notepad. There shouldn't be much lines of code between APPEND BLANK and the Gotfocus of the first control. Maybe some other control inits, form init, show and activate.
Bye, Olaf.
Olaf Doschke Software Engineering