Check your gear selectors ,I'm not familiar with the 6 speed box in an st170,but on other models of foci they use two gear selectors and the end of these selector are plastic with small teeth on one edge.
Over time these teeth wear and don't engage properly ,there is an easy way to check they are operating correctly and this is by getting someone too manually select 1-6 gears while you look at your selectors on the gearbox side ,if you see the selector cable moving but without engaging the correct gear then you have located the problem.
You can remedy the problem by drilling a small hole through the selector and cable and inserting a split pin ,many cars were recalled by ford too remedy this problem some main dealers used cable ties
Hope this helps