dishwasher fill problem

I have a GE dishwasher that doesn wash correctly. When I start it the first cycle seems to work fine. There through the rest of the wash cycles the fill valve is trying to fill the tub but the water is pumping into the drain, so it never fill during the wash cycles. Any idea what to check?