Please don't forget that you can SERIOUSLY injure a tiny yorkie pup with your hand. I feel so sad for him
I hope you take others advice to the heart- spanking will get you nowhere.
Good luck with potty training. I will most likely take quite awhile. Yorkies are notorius for having problems housetraining. Hope things work out.