Relacionar campos s/ preenchimento num showmessage
Gostaria de relacionar os campos obrigatorios...sem preenchimento em um showmessage sendo que de maneira coesa... sumarizando codigo.. !
Alguem tem um exemplo...?
Desde já agradeço.
Alguem tem um exemplo...?
Desde já agradeço.
Jonasaf
Curtidas 0
Respostas
Buosinet
03/03/2004
var Msg: String;
begin
Msg := ´´;
If edit1.text = ´´ then
Msg := Msg + ´Campo 1, ´;
If edit2.text = ´´ then
Msg := Msg + ´Campo 2, ´;
...
If editN.text = ´´ then
Msg := Msg + ´Campo N, ´;
If Msg <> ´´ then begin
// Tira vírgula do final do último campo
Msg := Copy(Msg,1,length(Msg)-2);
ShowMessage(´Por favor, informe o(s) seguinte(s) campo(s): ´ + Msg);
end;
end;
begin
Msg := ´´;
If edit1.text = ´´ then
Msg := Msg + ´Campo 1, ´;
If edit2.text = ´´ then
Msg := Msg + ´Campo 2, ´;
...
If editN.text = ´´ then
Msg := Msg + ´Campo N, ´;
If Msg <> ´´ then begin
// Tira vírgula do final do último campo
Msg := Copy(Msg,1,length(Msg)-2);
ShowMessage(´Por favor, informe o(s) seguinte(s) campo(s): ´ + Msg);
end;
end;
GOSTEI 0