4D was expecting an expression.
QUERY([Subfamilias];[Subfamilias]Registro_Fam=acodFam{$arr})