We consider the effect of a magnetic field on the motion of an atomic electron in its orbit. The usual treatment deals with the change in magnetic dipole moment assuming the electron's speed changes but the radius of its orbit remains unchanged. We derive the change in the magnetic dipole moment allowing both the speed and the radius to change. The cases of fixed radius on one hand and of fixed speed on the other are treated as special cases of our general case.