In addition to tape (or instead of it) I once used a small, thin shim of polyethylene plastic (cut from a blister package) to hold a flat cable in place. Cut the shim to just under the width of the connector and about twice as long.
First insert the cable and slide the shim on top into the connector as tightly as you can. (This is assuming the connection points of the cable are down toward the pcboard, of course.)
In most cases there is a bit of space above the cable that the shim can wedge into. It doesn't hurt to try this as it makes a better physical connection than tape.