  We study type IIA string theory compactified on Calabi-Yau fourfolds and
heterotic string theory compactified on Calabi-Yau threefolds times a
two-torus. We derive the resulting effective theories which have two space-time
dimensions and preserve four supercharges. The duality between such vacua is
established at the level of the effective theory. For type IIA vacua with
non-trivial Ramond-Ramond background fluxes a superpotential is generated. We
show that for a specific choice of background fluxes and a fourfold which has
the structure of a threefold fibred over a sphere the superpotential coincides
with the superpotential recently proposed by Taylor and Vafa in
compactifications of type IIB string theory on a threefold.
