TTable mystery - where am I?

This one is all about what mode you're in and what do we know about

There is a table/datasource/grid combination.

The table (MyTable) has three fields, call them Name, Count, and Base.

Currently, the grid shows the following Name values (Count and Base
don't matter here)


I navigate to the bottom of the grid and the indicator shows me
changing from one record to another. Now, down at 'e' I press the down
button to start and insert row and in the name column I put the value
'bb' and move to the count column where I put the value '1'.

Now the fun starts. In the OnColExit event I check to see if the value
is '1' and then I automatically set the Base column to the value
'Base'. (If the count is any other value, I let the user set it).

So in the OnColExit event I say:
        with MyTable do
        if (MyTableNAME.Text = 1) and (MyTableBASE.Text <> 'Base') then
        MyTableBASE := 'Base';

But it wasn't working. Turns out MyTableBASE was already set to base.
That's because MyTableName turned out to be 'b'.

So I have two questions and I'd be very grateful for answers to both
if anyone has them.

First, How did the currrent record get way up there at 'b'? Last I
knew I was just below 'e'.

Second, if this is not the way to set up a new value, what is?

BTW, I'm using interbase through the BDE, if that makes a difference.


Phil Cain