For each UIElement is not working

It doens’t work. I’ve been trying to recapture the element. But it doesnt work.
It gives me error even ifI open the same table I captured