We describe a systematic method for obtaining the coupling coefficients due to diffraction orders less than the grating order of second- and higher order resonant complex gratings in a multilayer structure. This method is based on an improved Green's function, and its distinguishing feature is its use of the transfer matrix method to simplify the theoretical analysis for obtaining the Green's function in multilayer structures. More importantly, it is also shown that by introducing gain or loss in second- and higher order resonant gratings, the range of controlling the total coupling coefficient becomes wider than those in first-order complex gratings or second order index gratings. Concepts like in-phase and anti-phase gratings are generalized in this type of grating. Finally, guidelines for designing complex-coupled DFB lasers with second- and third-order grating are also presented.