Hola.
Entonces creo que buscas algo como el segundo ejemplo del mensaje anterior:
Código Delphi
[-]
...
implementation
var
Valor: string = '';
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if Query1.FieldByName('Codigo').AsString = Valor then
DBGrid1.Canvas.Brush.Color:= clLime; DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
procedure TForm1.Edit1Exit(Sender: TObject);
begin
Valor:= Trim(Edit1.Text);
if Query1.Locate('Codigo', Edit1.Text, []) then
MessageBeep(MB_OK);
end;
Un saludo.