How to potty train my 2 yr infirm dog?

I have a 2 yr old Chihuahua mix who still poops in the house. She holds her pee for external but poops inside. We've tried crating her, yelling at her, even putting her face near it and yell NO!

Any ideas?

We have a 2 yr old Boston who call every time she has to go both pee and poop. We're going nuts with our chihuahua though! Help!!
try to lift your dog for long walks until he/she poops
Same way you potty train babies
Answers:    ably i have 2 chihuahuas one of them i got him when he was a short time ago 6 weeks old and he just do so well next to the pads. as far as my female dog i got her 5 months ago and she is 2 years mature i heard there so hard to train when at hand mutch older ..but i still try to do the same things i did with my mannish ..#1.always watcch wat there doing if u see the dog have to poop or pee pick up the dog and take it to the pads ..i always spank my dog on the thighs and said no.no.no later kinda put there nose were they did the mistake ..afterwards take them back to the area and read aloud here ..here .. i know its confusing but it will take time and patince ...good luck
What is flawless to enjoy for a hedgehog?   How much does a Chincoteague pony travel for at the auction?   Help me anyone who works beside pets or have have this done to here own?   I be only wondering.. Why don't animals hold Belly Buttons?  Don't they own umbillical cords?