Hello I am Dr. Joey. Thanks for asking your question and trusting me to help you and your pet today. I am a licensed veterinarian with over 20 years of experience.
As a note, Just Answer will automatically offer you a phone call - that is not from me and is not always helpful - nor I am not always able to take a phone call - so please don't accept without checking in via text first.
This could possibly due to intestinal parasites but worms are unusual in an adult dog to cause vomiting and diarrhea. They usually just cause diarrhea, not the vomiting. Is he eating well and acting normal or does it seem like he feels ill with this? As well when you say "tarry" do you mean "black" because that's a big deal if he has black stool.