procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if Key=#13 then begin
with QArticulo do begin
if active then Close; sql.Clear; SQL.Add(' SELECT ref, articulo, cantidad FROM articulos ');
SQL.Add('WHERE ref = '+Edit1.Text+'');
Open;
if not IsEmpty then begin
StringGrid1.Cells[1,1]:=fieldbyname('ref').AsString;
StringGrid1.Cells[2,1]:=fieldbyname('aticulo').AsString;
end else begin
ShowMessage('Articulo no existe');
end;
end;
end;
end;