The Nikon D40, D60, and D3000-series and D-5000 series cameras do not have an in-body focusing motor and will not autofocus with older lenses although those older lenses will Mount and meter. The D50, the D70,the D80, the D90,and the D300 and D200 and D100, all have an in-body motor. All of the single-digit cameras such as the D1, D2, D3,D4, D5 series models can use the older protocol lenses with full compatibility.same goes for the 600- and 700- and 800- series models...they can autofocus the older style lenses.
Basically it has been the lowest-priced cameras made by Nikon over the past 15 years or so which require the newer AF-S protocol lenses. The older autofocus Nikon lenses use the " screw drive" system.