Occurs after an application completes opening a dataset and before any data access occurs.
property AfterOpen: TDataSetNotifyEvent;
Write an AfterOpen event handler to take specific action immediately after an application opens
the dataset. AfterOpen is called after the cursor for the dataset is opened and the dataset is
put into dsBrowse state. For example, an AfterOpen event handler might check the system
registry to determine the last record touched in the dataset the previous time the application ran, and
position the cursor at that record.
This example updates the form's status bar with a message when an AfterOpen event occurs.
procedure TForm1.Table1AfterOpen(DataSet: TDataSet);
// now that the table is open, record information is available
StatusBar1.SimpleText := 'Record ' + IntToStr(PSQLTable1.RecNo) + 'of ' + IntToStr(PSQLTable1.RecordCount);