Okay - thanks for the additional information.
I would be suspicious that this may be from him getting into the trash. However, since we don't know his vaccination status, we can't rule out infectious causes (such as parvovirus). Other possible causes would include foreign bodies and GI parasites.
I am going to recommend witholding food for the nest 8-12 hours. Go ahead and continue to offer water, because we don't want him to get dehydrated. If by tomorrow morning, he hasn't stopped vomiting, then he needs to be seen by your vet first thing in the morning. If he has improved after 8-12 hours without food, you may begin to slowly reintroduce food by offer small amounts of a bland diet
(such as boiled chicken
breast meat and rice).
If he is able to keep that down, and the diarrhea is improving, you can slowly switch him back onto his regular food. Again, if he isn't improving tomorrow, he should be seen by your regular vet.
Hopefully that answered your question, please let me know if you have any additional questions or concerns.
If you found this information helpful, please click the green 'Accept' button so I can get compensated for my time. Thanks for using JustAnswer!