Sand getting into the pool is caused by a broken (cracked) lateral which could easily be done when changing the sand. Laterals are plastic mesh tubes in a spoked pattern that keep the sand in and let the water through. For my Hayward 22" it cost $80.00 CDN a few years ago.
Glenn
Bookmarks