When my dog is in the yard he barks constantly at everything!

Dogs bark in response to may things, a lonely dog will bark to get your attention or as a nervous habit, some dogs bark to show aggression.There is no absolute way to stop all barking but like most behaviors in moderation this is not a problem and is probably part of the reason you want a dog. This is where your earlier training will help, with the help of a simple child's cap gun. Create a situation where your dog has been known to bark and wait while out of his sight, when he begins to bark fire the cap gun, and say one firm NO! You will have to repeat this consistently but by controlling his barking he will become more secure and will come to know when it is or is not appropriate.