The electronic properties of a field-effect transistor with two different structures of MoSi2N4 and WSi2N4 monolayers as the channel material in the presence of biaxial strain are investigated. The band structures show that these compounds are semiconductors with an indirect bandgap. Their band gaps can be adjusted by applying in-plane biaxial strain. In the following, the variation of the energies of the valleys and corresponding effective masses with respect to the strain are explored. Finally, the strained MoSi2N4 or WSi2N4 are used as the channel of a p-type FET and the corresponding current-voltage characteristic is explored. The results show this FET has an ION/IOFF ratio larger than 10 6 and subthreshold swing in the range of 96-98 mV/dec. The ION/IOFF ratio of these compounds with respect to strain are compared.