Topic: PROBLEM previous action keept

Hello, I have a problem can you help me.
when i click the field from the table grid
The problem that i create a query to check if the boolean result is true button enabled else button disabled

VALIDATOR.Edit27.Value := strtoint(d1) ;
    VALIDATOR.Edit28.Value := strtoint(s1) ;
    if strtoint(d1)= strtoint(s1) then
    begin
       validator.Button2.Enabled := false;
    end;
    VALIDATOR.Edit29.Value := strtoint(d2) ;
    VALIDATOR.Edit30.Value := strtoint(s2) ;
    if strtoint(d2)= strtoint(s2) then
    begin
       validator.Button3.Enabled := false;
    end;
    VALIDATOR.Edit31.Value := strtoint(d3) ;
    VALIDATOR.Edit32.Value := strtoint(s3) ;
    if strtoint(d3)= strtoint(s3) then
    begin
       validator.Button4.Enabled := false;
    end;
    VALIDATOR.Edit33.Value := strtoint(d4) ;
    VALIDATOR.Edit34.Value := strtoint(s4) ;
    if strtoint(d4)= strtoint(s4) then
    begin
       validator.Button5.Enabled := false;
    end;
    VALIDATOR.Edit35.Value := strtoint(d5) ;
    VALIDATOR.Edit36.Value := strtoint(s5) ;
    if strtoint(d5)= strtoint(s5) then
    begin
       validator.Button6.Enabled := false;
    end;
    VALIDATOR.Edit37.Value := strtoint(d6) ;
    VALIDATOR.Edit38.Value := strtoint(s6) ;
    if strtoint(d6)= strtoint(s6) then
    begin
       validator.Button7.Enabled := false;
    end;
    VALIDATOR.Edit39.Value := strtoint(d7) ;
    VALIDATOR.Edit40.Value := strtoint(s7) ;
    if strtoint(d7)= strtoint(s7) then
    begin
       validator.Button8.Enabled := false;
    end;
    VALIDATOR.Edit41.Value := strtoint(d8) ;
    VALIDATOR.Edit42.Value := strtoint(s8) ;
    if strtoint(d8)= strtoint(s8) then
    begin
       validator.Button9.Enabled := false;
    end;
    VALIDATOR.Edit43.Value := strtoint(d9) ;
    VALIDATOR.Edit44.Value := strtoint(s9) ;
    if strtoint(d9)= strtoint(s9) then
    begin
       validator.Button10.Enabled := false;
    end;
    VALIDATOR.Edit45.Value := strtoint(d10) ;
    VALIDATOR.Edit46.Value := strtoint(s10) ;
    if strtoint(d10)= strtoint(s10) then
    begin
       validator.Button11.Enabled := false;
    end;
Post's attachments

Attachment icon 12.png 26 kb, 99 downloads since 2021-01-21 

Re: PROBLEM previous action keept

second image

Post's attachments

Attachment icon 13.png 27.11 kb, 100 downloads since 2021-01-21 

Re: PROBLEM previous action keept

 
var
s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,matrr: string;
validted : string ;
begin

 matrr :=  validator.Edit14.Text;
validator.Edit14.Text := validator.Edit12.Text;
validator.Edit15.Text := validator.Edit13.Text;
validator.Edit16.Text := validator.Edit2.Text;
validator.Edit17.Text := validator.Edit3.Text;
validator.Edit18.Text := validator.Edit4.Text;
validator.Edit19.Text := validator.Edit5.Text;
validator.Edit20.Text := validator.Edit6.Text;
validator.Edit21.Text := validator.Edit7.Text;
validator.Edit22.Text := validator.Edit8.Text;
validator.Edit23.Text := validator.Edit9.Text;
validator.Edit24.Text := validator.Edit10.Text;
validator.Edit25.Text := validator.Edit11.Text;
 c1 := validator.Edit2.Text;
 c2 := validator.Edit3.Text;
 c3 := validator.Edit4.Text;
 c4 := validator.Edit5.Text;
 c5 := validator.Edit6.Text;
 c6 := validator.Edit7.Text;
 c7 := validator.Edit8.Text;
 c8 := validator.Edit9.Text;
 c9 := validator.Edit10.Text;
 c10 := validator.Edit11.Text;
 d1 := sqlexecute('select count(*) from Validated where affected = "'+c1+'"  ');
 d2 := sqlexecute('select count(*) from Validated where affected = "'+c2+'"  ');
 d3 := sqlexecute('select count(*) from Validated where affected = "'+c3+'"  ');
 d4 := sqlexecute('select count(*) from Validated where affected = "'+c4+'"  ');
 d5 := sqlexecute('select count(*) from Validated where affected = "'+c5+'"  ');
 d6 := sqlexecute('select count(*) from Validated where affected = "'+c6+'"  ');
 d7 := sqlexecute('select count(*) from Validated where affected = "'+c7+'"  ');
 d8 := sqlexecute('select count(*) from Validated where affected = "'+c8+'"   ');
 d9 := sqlexecute('select count(*) from Validated where affected = "'+c9+'"   ');
 d10 := sqlexecute('select count(*) from Validated where affected = "'+c10+'" ');
 s1 := sqlexecute('select '+c1+' from cotats ');
 s2 := sqlexecute('select '+c2+' from cotats ');
 s3 := sqlexecute('select '+c3+' from cotats ');
 s4 := sqlexecute('select '+c4+' from cotats ');
 s5 := sqlexecute('select '+c5+' from cotats ');
 s6 := sqlexecute('select '+c6+' from cotats ');
 s7 := sqlexecute('select '+c7+' from cotats ');
 s8 := sqlexecute('select '+c8+' from cotats ');
 s9 := sqlexecute('select '+c9+' from cotats ');
 s10 := sqlexecute('select '+c10+' from cotats ');

Re: PROBLEM previous action keept

up
up
up

Re: PROBLEM previous action keept

It's hard to check it without seeing all the actual script and forms. maybe if you can attach the project. Someone can see and check it.

brian