GE dishwasher wont start

WE have to open and close the door on the dishwasher many times to get it to start. anything from closing it easy to slamming it . What is causing this problem?