Ver Mensaje Individual
  #1  
Antiguo 14-07-2006
Avatar de ContraVeneno
ContraVeneno ContraVeneno is offline
Miembro
 
Registrado: may 2005
Ubicación: Torreón, México
Posts: 4.740
Reputación: 26
ContraVeneno Va por buen camino
Código Delphi [-]
procedure TAlquiler.MaskEdit1KeyPress(Sender: TObject; var Key: Char);
begin
if Key=#13 then begin
 with qryCliente do begin  
  if active then Close; //Agregué aquí
  sql.Clear; // y aquí
  SQL.Add(' SELECT telefono1_cliente, nombre_cliente, apellidos_cliente FROM tbClientes ');
  SQL.Add('WHERE telefono1_cliente = '+quotedstr(MaskEdit1.Text) );
  Open;
  if not IsEmpty then begin
    DBText1.Caption:=fieldByName('nombre_cliente').AsString+' '+fieldByName('apellidos_cliente').AsString;
    Edit2.SetFocus // esto era todo lo que necesitas para cambiar a películas
  end else begin
    ShowMessage('Cliente no existe');
  end; //if cliente is not empty (aquí te sobraba un "end"
 end; //with 
end; //procedire
a ver ahora....

P.D. Extraño a delphi
__________________

Responder Con Cita