I've had good success with the "dog whistle" type devices that emit a sound dogs dislike. At our last place, the neighbors little dog barked like crazy everytime we went out the door. After just a couple of days of using the device every time it barked at us, it learned to keep quiet.
That said, it doesn't seem to work on all dogs. Might be that some older dogs don't have good enough hearing to be affected.