C.O.
you mean gnats? those little buggers that are smaller than mosquitoes? or do you have fruit flies?
fruit flies are small like gnats. The only way I know how to get rid of them is to eliminate their food source - just like this link states...
http://www.wikihow.com/Get-Rid-of-Gnats
If you have ANY fruit or vegetables - potatoes, tomatoes, etc. out then that is what is attracting them.
Trash MUST be kept closed. Taken out regularly.
Good luck!!