The best way to prevent an infestation, because the eggs can lie dormant in your carpet, is by getting flea powder from the pet store. I dealt with fleas years ago from a rescue cat. Sprinkle it all over your carpets and leave it there at least 48 hours before you vacuum. As far as the frontline, all you can do is wait. If you put it on immediately after bathing the dog, it will not work right away. It works in conjunction with the oils on the skin. Wash the oils off and there is nothing for the flea med to spread along the body on. If you bathe the dog again within a few days of applying it, it will have been a waste of money to even buy it in the first place because you just keep washing the dog..
I know it says the dog can get wet a day or so after applying but think about it, frontline is distributed mostly through the skin using the natural oils. A percentage is absorbed into the blood for long term coverage. Clean dry skin will repel a large amount of it so it will not be nearly as effective.
Anyway. Try the flea powder trick. It works wonders. Put it on the dog bed, under couch cushions, on all carpets, rugs, anywhere the dog goes. Put all small rugs for bathroom, kitchen, etc, outside on a clothesline or something for a week.
Give the frontline a couple days to work.