First of all, let's take a look at the probable cause of the problem, and then we'll see how you can treat it.
Even when you're very thorough, I'm afraid that cleaning every three to four weeks simply isn't enough. It would be better to clean once a week, even if you only have time to do so lightly, then continue with your thorough cleaning routine as usual. This will help to prevent a build-up of waste in the tank which is almost certainly the cause of the outbreak - the fly larvae need something to feed on, or they wouldn't be there. You may not be seeing this waste in the water because it's all getting sucked into the filter, creating the perfect environment for the flies.
First of all, you need to change your filter medium. Don't try to clean it, just throw it out (preferably outside your house, in case more flies are ready to hatch) and put in a new one. Then remove all the non-electronic parts of your filter - tubing, plastic casing, and whatever else you can get to, excepting the medium - and boil it. If you dip it in cold water afterwards it should be ready to return to the aquarium immediately, so the whole process need only take ten minutes, and your fish can manage without their filter for that long. This should kill off most of the flies and fly larvae.
If you continue to have problems, consider getting some more aggressively insectivorous fish for your tank. Guppies would be a good choice - they should get on well with your other fish, they're hardy, they won't take up much space, and they'll eat pretty much anything they can find on the water surface. They're also very good at spotting prey.
Many aquarists have problems with insects from time to time. It can be very distressing to find your home infested, but I really think that if you make an extra effort to clean your tank then this problem will diminish. Make sure you're not overfeeding your fish and rinse your filter medium regularly. Good luck!
Your email won't be published. Comments are moderated before appearing.