Go the the tac store, feed store they will show you what you need?
I also have seen some fly repell products in Petsmart and Petco...
Now the dog needs medical attention to the ear for flies are carriers of severe bacteria...
please get into your vet to address the ears....
But, the stores have a fly repellent and it works...
Also, outside in the area you dog utilizes, can you put up those sticky fly tapes, comes in little cartridge and rolls out like sticky tape and you hang em' all over,,,,it works..very inexpensive, get at Walmart or Dollar General stores...$1 -$5...cost
And, the ranch the horses we wash in repell or spray repell....
Welcome to the dog forum, maybe someone else know some tricks...
Keep us posted...
Oh, and we're giving her a bath tonight (thought maybe she got too hot and the flies were attracted to her). But is there anything else we can do to keep the flies away?