#2. "RE: 50mm 1.8 sdoesn't work with D40 but does with D200" In response to In response to 0
Check this post, which is pinned at the top of the Forum, for a list of lenses that are fully compatible with your D40. Unfortunately, your AF 50mm f/1.8D is not on the list, because it lacks the internal autofocus motor that the D40 relies upon. It will work other than AF, though
To get full function on the D40 or comparable cameras, you would need the newer AF-S 50mm f/1.8G Nikkor.