>>I got a beagle who was almost 1yr old several months ago. The lady who had him had kept him outside but I have him inside. He gets let out all the time and walked.He has picked an area in one of my living rooms and poops and pees there. One day we had just let him in after being outside for a while and he went right behind the couch to pee. How do I stop this?>>>
One thing to do is block off that area for awhile so that he can't get to it. Also treat it with a bacterial enzyme odor eliminator product such as Nature's Miracle. It will have to soak in deeply and be kept active for awhile to do the job.
Also try food rewards for pottying outside. This means of course that you'll need to be with him when he's outside. Dogs outside on their own doesn't work too well for housetraining. You need to know when he potties, and you need to be there to reward him when he does it outside.
Inside, 100% supervision whenever he is not in his crate or other safe place where he will not potty. Some people use a room with a baby gate for this. Any place where he will not potty is fine for this purpose. Of course he needs as much time with you as possible, for learning, exercise, bonding, and having a good life. The safe place is just for when you're not home, asleep, or absolutely cannot supervise the dog.
-----
Kathy Diamond Davis, author, "Therapy Dogs: Training Your Dog to Reach Others," 2nd edition, and the free Canine Behavior Series at www.veterinaryforum.com