Optical traps are commonly constructed with high-numerical-aperture objectives. Oil-immersion objectives suffer from spherical aberrations when used for imaging in aqueous solutions. The effect of spherical aberrations on trapping strength has been modeled by approximation, and only a few experimental results are available in the case of micrometer-sized particles. We present an experimental study of the dependence of lateral and axial optical-trap stiffness on focusing depth for polystyrene and silica beads of 2 microm diameter by using oil- and water-immersion objectives. We demonstrate a strong depth dependence of trap stiffness with the oil-immersion objective, whereas no depth dependence was observed with the water-immersion objective.