If Table2.Locate('Login', Edit1.Text, []) then If Table1.Locate('Parol', Code, []) then If Table1.FieldByName('Kod').Value=Table2.FieldByName('Kod').Value then begin