We show how non-trivial form fields can induce an effective potential for thedilaton and metric moduli in compactifications of type II string theory andM-theory. For particular configurations, the potential can have a stableminimum. In cosmological compactifications of type II theories, we demonstratethat, if the metric moduli become fixed, this mechanism can then lead to thestabilization of the dilaton vacuum. Furthermore, we show that for certaincosmological M-theory solutions, non-trivial forms lead to the stabilization ofmoduli. We present a number of examples, including cosmological solutions withtwo solitonic forms and examples corresponding to the infinite throat ofcertain p-branes.