Calculating the gravitational field strength felt by our Moon, caused by our Earth and Sun, I found that the magnitude of the Sun's gravitational field is felt as greater by the Moon than the Earth's.
Using the equation g=GM/r^2
where G is the universal gravitational constant, M is the Mass of the object producing the gravitational field, and r is the distance away from that object (i.e. distance between centers of the Earth and Moon, and the Sun and Moon).
My calculations yielded:
g of Sun on Moon = 0.00590 N/kg
g of Earth on Moon = 0.00262 N/kg
This concerned me for obvious reasons. If the Sun's gravitational field is more influential for the Moon than the Earth's, then why does the Moon remain in orbit around the Earth?
I expect I am missing something important. Any help is appreciated. Especially a thorough explanation of the theory, principles, and an overview of the mathematics involved.