At openings and doors hang a water bottle with pennys in them. They hate those!
I have chickens and I keep a muslin bag of cotton balls soaked in real vanilla. I never have fly issues. Try and make sure garbage pails aren't near entry ways, and that doors and windows seal.
Lots of tips here: https://www.craftylittlegnome.com/flies-house-suddenly/
You might want to consider investing in better quality window screens that fit tighter, and are a finer mesh than the ones you have now.
Hi John: You didn't say what type of fly you had, but here are some sites that may help: