I have the following snippet of code

   tmpAdjustments = oEv.Source.Model.Parent

   with tmpAdjustments

       if .RowInserted then

           .InsertRow

       end if


Where oEv.Source.Model.Parent is a dataform that feeds a grid control.
This is an HSQL embedded database. I know that I am sitting on an
unsaved inserted row when this is called. However, the test .RowInserted
returns false.

The next lines in the macro is

       do

           .First


And here I have a real problem. If the call to first happens, with the inserted
row not saved it generates a "Function Sequence Error" and at this point the
forms' UI is completely messed up. There appears to be two record pointers
on the form and any further interaction causes continued function sequence errors
to be reported.

This is using the 155 developers build.

First question - shouldn't the .RowInserted be a valid test for an HSQL database?

Second question - I KNOW that the data in the inserted row is valid for the record, so why did the call to .First not simply post the data to the engine before the move?

Third queston - the macro is called from a click on a button. The button has it's property set to take focus. Should this not have caused a post of the inserted record even before the macro was called. Or, is this not the case because the button is also
owned by the dataform control that ownes the grid itself?

Thanks

Drew

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to