I have the following code below:
for i := 1 to form1.variavel do
with form1 do
if TEdit(FindComponent('edt_variavel'+IntToStr(i))).Text = '' then
begin
showmessage ('Preencha os campos em branco')
end
else
form2.showmodal;
It checks for blank fields and displays a message if it exists.
In the application it shows the message 2 times, it shows Preencha os campos em branco
, I click ok and it repeats the same message.