Fórum Probleminha com While #190267
22/10/2003
0
Tenho um while que não quer dar certo, está assim
While (Not Tb3_Contrato.Eof) do
Begin
if (Tb3_ContratoCodImovel.Value = TbContratoCodImovel.value) and
(Tb3_ContratoNumero.Value <> TbContratoNumero.Value) then
begin
WEnc := True;
break;
end;
Tb3_Contrato.Next;
end;
a primeira vez e executo ele dentro do sistema ele funciona mas a partir da segunda a tabela tb3_contrato fica true e precisa estar false no while então não executa por estar true, o que pode estar atrabalhando isso?
While (Not Tb3_Contrato.Eof) do
Begin
if (Tb3_ContratoCodImovel.Value = TbContratoCodImovel.value) and
(Tb3_ContratoNumero.Value <> TbContratoNumero.Value) then
begin
WEnc := True;
break;
end;
Tb3_Contrato.Next;
end;
a primeira vez e executo ele dentro do sistema ele funciona mas a partir da segunda a tabela tb3_contrato fica true e precisa estar false no while então não executa por estar true, o que pode estar atrabalhando isso?
Janete
Curtir tópico
+ 0
Responder
Posts
22/10/2003
Janete
Tenho um while que não quer dar certo, está assim
While (Not Tb3_Contrato.Eof) do
Begin
if (Tb3_ContratoCodImovel.Value = TbContratoCodImovel.value) and
(Tb3_ContratoNumero.Value <> TbContratoNumero.Value) then
begin
WEnc := True;
break;
end;
Tb3_Contrato.Next;
end;
a primeira vez e executo ele dentro do sistema ele funciona mas a partir da segunda a tabela tb3_contrato fica true e precisa estar false no while então não executa por estar true, o que pode estar atrabalhando isso?
Estou usando esta tabela somente para este white, em mais nenhum lugar somente para abrir e fechar o form onde eu a ativo.
Responder
Gostei + 0
22/10/2003
Janete
acrescente esta linha antes do while:
Tb3_Contrato.First;
e veja se dá certo.
perfeito, havia me esquecido disto, Obrigado
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)