Please also look up encopresis. A child who is not comfortable using the loo at school, for example, can learn to "hold" it so he won't have to go to the bathroom, and it can reduce the ability of the colon to function. Talk to a pediatric GI specialist to see if this is what is going on.
Lots of discussion on this subject on the ADHD forum. You might want to check it out. The last post should be helpful . Go here.
http://www.medhelp.org/posts/ADD---ADHD/Playing-with-poop/show/445319#post_8750196