>On a form I have a grid which displays data from a couple of tables. The tables are opened by the data environment and in the Form's Activate code a seek command moves the record pointer to the first matching record to be displayed.
>
>Problem: When the form is run the table contents frequently are immediately displayed with incorrect data but 0.5 or 1 second or so later the column data changes to the correct data - almost as if the data displayed on the previous time the form was run is displayed First.
>
>Question: Should I move the Seek command from the Form's Activate Code to Load or Init Code....or do something else? As you may guess I am not sure aboout the firing sequence in forms in relation to table opening and grid populating (i.e. when does the grid populate with data during the firing sequence?
>
>Any ideas?
The reason is that Grid will automatically catch some data after its Init event (i.e. even before the form init), therefore the best natural place to put your code is Grid.Init event, though Form.Init will work too.
Edward Pikman
Independent Consultant