I'm dealing with the same thing, puppies don't have good bladder control until about 6 mo, kennel train them and get puppy pads for inside and when the dog is out about the house, watch him constantly for signs of peeing or pooping,( sniffing on the floor, circling in one spot, going to the door) it takes a lot of patience and I'm already pretty frustrated too but reward the pup when he goes outside
limit him to a certain area of the house and watch him all the time for about a month and take him out to the restroom every 2 or 3 hours praising him when he goes outside and smacking his but when he goes inside
A good way to get your dog to stop is to get in the habit of taking him/her outside everyday. Another good way is to limit the dogs bathroom area; wherever the dog seems to do most of his "business" is where you should consider laying puppy pads down.
Take him out on a regular schedule. If you find a poop you shove his nose in it and scold him then take him out. If you see him getting ready to potty scd him firmly and take him out. When my dog was a puppy i took her out at about 5:30am, came home for lunch to take her out, took her out the minute i got home then again at bedtime. I also took her out any time she 'asked' or indicated she needed out. For the first several weeks she slept in her locked kennel and spent the day in it because dogs usually wont potty where they sleep.