I know my D40 doesn't have a motor in it to auto-focus lenses.
What type of lens has the motor in it? How can I know which lenses will and will not work?
Nikon with AF-I and AF-S
Sigma with HSM (and older ones that list as "with motor for Nikon" or the like obviously)
Tamron with USD (and older ones that list as "with motor for Nikon" or the like obviously)
Tokina lenses specifically listing "built-in AF motor drive" as a feature
As you note, the D40 doesn't have an autofocus motor. Nikon's designation for the lenses that have the motor include the AF-I and AF-S lines.
Nikon Lenses with the designation AI, AI-S, AF will not work on your camera. Lens zCodes can be found here: