Medium-energy accelerators are often confronted with problems during transition energy crossing, such as longitudinal microwave instability and nonlinear synchrotron motion. These problems can be avoided by an accelerator having a negative momentum-compaction factor. A modular method for designing a lattice with adjustable momentum-compaction factor is presented. The dispersion excursion of the basic flexible momentum compaction module can be minimized to less than the maximum dispersion of the focusing-defocusing (FODO) lattice containing the same FODO cells. The phase advance of the module can be adjusted to be an odd multiple of quarter betatron waves. We found that a lattice composed of such modules possesses excellent chromatic properties with excellent tunability, smaller systematic stop-band widths, and smaller sextupole distortion functions.