Definitely need to know how old he is because yorkies little muscles do not mature to be able to "hold it" for sometimes up to 5-6 months. It can be very frustrating. Just continue to give a LOT of praise for doing it in the right place and don't holler at them for accidents. Do clean up after them with an enzyme cleaner that will remove their scent.
It can easily take up to a year to get a yorkie fully house-trained. Some just take to it sooner. My girls have been easier to house-train than the boys but that could be coincidence.
How long have you had him and been trying to housetrain? Have you checked out the sticky in the Training forum:
http://www.yorkietalk.com/forums/tra...ms-solved.html It has some valuable advice. Good luck!