I have a d40. It has autofocus. What it doesn't have is an focus motor built into the camera. The autofocus motor is in the lens. What that basically means is with an old lens you have to focus manual. With a current model lens, the autofocus works exceptionally well. The entire line of Nikkor DX lens will autofocus and do it quickly on a D40.
Bookmarks