This may be due to intestinal upset from a change in food, intestinal parasites such as worms, coccidia, or giardia, or he could have a viral infection starting too if he did not complete his puppy shots.
This could also be due to a swallowed non food item, ingestion of something toxic including plants, mushrooms, chemicals etc. A swallowed non food item is pretty common problem in this age pup due to teething and chewing on things too soothe any jaw aches from adult teeth coming in and settling into the jaw.
So seeing the vet to find out what is going on should be a priority.
An over the counter med you might try would be Pepcid or Tagamet or Zantac.
Be sure to tell the vet when you see them if you use any of these.
You can read about dose amounts (and cautions) scrolling down on the pages here
http://www.petplace.com/drug-library/cimetidine-hcl-tagamet/page1.aspx
http://www.petplace.com/drug-library/famotidine-pepcid/page1.aspx
http://www.petplace.com/drug-library/ranitidine-hcl-zantac/page1.aspx
If that helps then you can see if some bland food and plain pedialyte added to the water bowl will work to resolve the upset.
I would suggest trying boiled chicken meat or hamburger with the fat drained off, mixed with really well cooked rice in a ratio of 1/3 meat to 2/3 rice to see if that works. It's not a balanced diet but OK to use for a few meals while working on controlling digestive upset.
If your home care doesn't work over the next day or if he seems worse when your vet opens I'd suggest you see them.
Hope this helps you!
Yes the candy corn could be the issue.
If that is the case I'd just let him rest, let him have water, and feed a bland meal for his morning meal and see if he has diarrhea with candy corn in it later.
I would not use pepto bismol as it has some aspirin compounds in its latest formulation which can be irritating for a dog's stomach which is more acid than ours is.
If you want to use one of the meds suggested above you can read the page (you may have to close a pop up to see it) listed for that med to learn dose info.
Dog Expert:Rescue, Train,Breed,Care
30+ yrs dog home vet care & nursing, rescue, behavior&training, responsible show breeding, genetics