if DataSource1.DataSet.Locate('Nomer',Edit1.Text,[loCaseInsensitive,loPartialKey]) Then Edit2.Text := Query1['ID_tov'] Else Edit2.Text := '-1';