Ver Mensaje Individual
  #2  
Antiguo 22-01-2007
Avatar de Bicho
[Bicho] Bicho is offline
Miembro Premium
 
Registrado: jul 2003
Ubicación: Inca - Mallorca
Posts: 1.776
Reputación: 24
Bicho Va por buen camino
Hola, vayamos por partes:

1- Puedes usar el evento OnKeyPress o el OnKeyDown
2- Prueba con ésto:

Código Delphi [-]
procedure TForm1.Edit1Exit(Sender: TObject);
begin
   if not ExisteValorEnTabla(Edit1.Text) then begin //sino existe en la tabla ejecuta lo de abajo
     Edit1.Text := ''; //vacias el contenido del edit
     Edit1.SetFocus; //le das el foco nuevamente a tu edit
   end;
end;

Saludos
Responder Con Cita