Hola Valee.
No está muy clara la consulta, pero apengándome a lo que entendí sería:
Código Delphi
[-]
procedure TForm1.btnCargarClick(Sender: TObject);
var
i,j: Integer;
toCharge: Boolean;
E: TEdit;
begin
toCharge:= True;
for i:= 0 to ComponentCount-1 do
if (Components[i] is TEdit) then
begin
E:= TEdit(Components[i]);
if (E.Text = EmptyStr) or (Length(E.Text) < E.MaxLength) then
toCharge:= False
else for j:= 1 to Length(E.Text) do
if not (Upcase(E.Text[j]) in ['0'..'1','A'..'Z',
'Á','É','Í','Ó','Ú','Ñ','á','é','í','ó','ú','ñ']) then
toCharge:= False;
end;
if toCharge then
begin
ShowMessage('Se procede a la carga');
end
else
raise Exception.Create('Datos faltantes o incorrectos para iniciar la carga');
end;
El procedimiento verifica que:
- No haya Edits vacíos.
- Esten completos (que haya tantos caracteres como indica la propiedad MaxLength).
- Su contenido sean letras y/o números.
Saludos