Make sure you have a lock-washer between the headset cup and locknut. Make SURE it's not a keyed lockwasher with a little tab. If it does have a tab, file it off. Then to make sure the locknut stays put, use TWO WRENCHS. One wrench tightens DOWN the the locknut while the other one brings UP the adjustable cup. By pressing both parts into each other, you get enough clamping to hold them in place.
BTW, make sure your steerer-tube isn't too long and causing the locknut to bottom out on it.