In minimizing the opportunity to have an affair you, 1) Recognize the kind of situations that stimulate or tempt you; 2) Choose your friends carefully.
Again, most affairs occur between family members, close personal friends, or co workers. If your closest friends do not have a strong commitment to their marriage, if their commitment is not as strong as your commitment, they should not be your best friends. You should not spend a lot of time with them. You need to have people around you who are committed to their marriage like you are to yours.
3) Establish some protective guidelines.
Offices are absolutely ripe for budding romances. Everybody smells good, dressed nicely, on their best behavior. It's easy to be attracted to somebody in an office setting.
Just a thought from the front porch…