We present a scheme to control the generated ultrafast magnetic field in $\rm H_{3}^{2+}$ molecule by using multi-frequency tricircular pulses composed of co and counter-rotating bicircular pulses. Simulations show that the field amplitude and the wavelength are two significant factors on magnetic field generation by tricircular pulse. Specifically, the strength of magnetic field is linearly related to the field amplitude at $\lambda _{0}$=50 nm, while at $\lambda _{0}$=70 nm, the strength first increases and then decreases with the amplitude, which can be attributed to the resonance between the ground and excited states. Moreover, the phase and helicity of bicircular pulse were shown to have important effects on the magnetic field. The dependence of the magnetic field on the phase arises from the interference effect between multiple ionization pathways. These findings illustrate a guiding principle of controlling the magnetic field in molecular systems for future researches in ultrafast magneto-optics.