With all the summer bounty, we've been having fruit flies in our kitchen. I put some apple vinegar (to attract them) and a drop of liquid soap (to trap them) in a tiny glass and covered it with plastic wrap. I poked some large holes in the plastic wrap. It works!
Next, I'm going to try something similar for the mosquitoes in the backyard.