Well first off you want to make sure that your dogs are getting the amount of excersice they need depending on what breed of dog they are. Dogs with too much energy won't likely pass up a chance to chase
anything.
Provided the above is fulfilled you can try to avoid having your dog chase sheep by teaching them the "Watch Me" command. All this requires is that your dogs look at you and disregard everything else. It helps so that (if they haven't seen the sheep yet) they'll most likely overlook them and not chase. To make this effective the command has to be well rewarded and more 'game' like so that they actually want to do what they are told.
Also make sure that your recall is well ingrained in them. That they know and obey the command 'come' when it is issued. There a few ways to do that, I've outlined some of them here:
http://k9domain.org/basic_commands.aspxHope that helps and best of wishes on this issue!