The physics of magnetic superconductors is a very intriguing subject due to the pronounced competition of the ferromagnetic order and superconductivity in bulk materials. Two fundamental properties of the superconducting state are zero electrical resistance and the Meissner-Ochsenfeld effect. In this work theoretical investigation on the coexistence of superconductivity and ferromagnetism in superconductor ErNi2B2C has been made. By developing the model Hamiltonian for the system and using the double time temperature-dependent Green s function formalism, we obtain expressions for superconducting transition temperature (Tc), magnetic ordering temperature (Tm) and superconductivity and magnetic ordering parameters. By using the experimental and theoretical values of the parameters in the obtained expressions the phase diagrams of superconducting transition temperature versus magnetic ordering parameters and magnetic ordering temperature versus magnetic ordering parameters are drawnand by combining the two phase diagrams we have drawn a phase diagram which shows the possibility region of the coexistence of superconductivity and ferromagnetism in superconductor ErNi2B2C.