There are some natural and home made dog repellents you can try, generally these produce scents that dogs dislike. If you are lucky then they will dislike them enough to keep away!
Vinegar soaked old clothes or socks can smell bad to dogs, enough to stop them sniffing and digging or pooping in a particular flower bed or lawn area. Ammonia again is very pugent and off putting for dogs, soak an old shirt in it and place it carefully on a stick. Don't pour vinegar or ammonia directly on the ground as it will affect your plants.
Chili pepper and curry powder can be sprinkled where they like to sniff as an effective easy deterrent. It's easily washed away by rain so don't forget to apply some more when the weather improves.
Some people swear by crushed lemons spread on your lawn or flower bed, this can be a deterrent if they are fresh enough and still have a strong citrus smell.
Try spraying antiseptic mouth wash or rubbing alcohol on your lawn or fence, it's another simple effective deterrent.
For more reliable deterrents try an automatic jet sprayer or ultrasonic device.