A technical object is to provide an ophthalmic apparatus and an ophthalmic apparatus control program that are capable of appropriately performing alignment in a wide range. An ophthalmic apparatus that examines an examinee's eye includes: an optometry unit that examines the examinee's eye; drive means that adjusts a relative positon between the optometry unit and the examinee's eye; an illuminating optical system including a first illuminating optical system for illuminating an anterior segment of the examinee's eye and a second illuminating optical system for illuminating a wider range than the first illuminating optical system; an imaging optical system including a first imaging optical system for imaging the anterior segment of the examinee's eye and a second imaging optical system for imaging a wider range than the first imaging optical system; and control means that controls an illuminating state with respect to the anterior segment between anterior segment illumination by the first illuminating optical system and wide range illumination by the second illuminating optical system.