tmp:=Grid.DataSource.DataSet.FieldByName('FIELD').AsVariant; if tmp>'' then Form2.ShowModal else ShowMessage('Сообщение об ошибке');