Exerting control over the environment where horses live can go a long way toward keep flies at bay, and it is environmentally friendly. By controlling moisture in the environment as well as airflow, you can make your stable less hospitable to flies.