He may have a virus or he may have eaten something that didn't agree with him. When are you taking him to the vet?
I'd give him a little pepto bismol in the meanwhile and make sure he drinks.