Does it work on flies and fruit flies?
It does for me when I use apple cider vinegar, water and a squirt of dish detergent in an open container.
I wrote a post about getting rid of bugs that might help you - https://chascrazycreations.com/diy-bug-repellents-traps/
I just use apple cider vinegar. As you can see it works great.
2 tablespoons Apple cider vinegar and A dash of Dawn in a ramekin worked for me on fruit flies. No need for plastic wrap as well