Preventing an affair from happening often involves exhibiting some traits needed for a healthy relationship. Strong communication, honesty, the willingness to listen, amongst so many other characteristics would help prevent an affair from happening.