Topic: my code
procedure Form1_Edit1_OnChange (Sender: string);
begin
if (form1.edit1.value > 7) and (form1.edit1.Value < 10) or (form1.edit1.Value > 10) then
begin
showmessage('Value must be between 0 and 7 or 10.');
end
else
if form1.edit1.Value = 10 then
begin
form1.edit35.Value := form1.edit35.Value + 1;
form1.edit40.Value := form1.edit40.Value + 1;
form1.edit14.Value := form1.edit14.Value + 1;
end
else
begin
form1.edit40.Value := form1.edit40.Value + 1;
form1.edit14.Value := form1.edit15.Value + 1;
end;
recalculateall;
end;
is there something wrong with this block of code. i run it and when i change edit1 the other values; increment by 1 or more and values increment that arent supposed to and i get all kinds of wild results.
lee