Let \( p \) be a prime and let \( \mathcal{D}=\{d_1, d_2, \dots, d_s\} \) be a subset of \( \left \{ 1, 2, \dots, p-1 \right \} .\) If \( \mathcal{F} \) is a Hamming symmetric family of subsets of \([n]\) such that \( \lvert F \bigtriangleup F' \rvert ( \bmod \ p ) \in \mathcal{D} \) and \( n- \lvert F \bigtriangleup F' \rvert ( \bmod \ p ) \in \mathcal{D} \) for any pair of distinct \( F \) , \( F' \in \mathcal{F} \) , then \(|\mathcal{F}| \leq {{n-1} \choose {s}}+ {{n-1} \choose {s-1}}+ \cdots + {{n-1} \choose {0}}.\) This result can be considered as a modular version of Hegedüs's Theorem [6] about Hamming symmetric families. We also improve the above upper bound on the size of Hamming symmetric families in the non-modular version when the size of any member of \( \mathcal{F} \) is restricted.