Mon 28-Sep-09 02:58 AM | edited Mon 28-Sep-09 03:04 AM by Floridian
Why do you want to upgrade? That would help answer your question. Nikon makes both cameras because they think one will be better for some people while the other will be better for others.
Both will take better quality photos than your D40 in theory, but in practice you may not be able to see the difference. I have a D50 (6mp, like your D40, but even older design) and a D300, which has the same sensor as the D5000 and should take equivalent photos. I still use my D50 a lot, even though I have a D300 available, because most of the time the quality difference won't be visible in my photos. You have to have a pretty demanding situation in terms of what you're photographing (for example, action photos in low light) or how you're using the photograph (for example, cropping a lot and printing large prints) before any difference would be visible in the results.
If you can't point to some specific reason that your D40 falls short, I'd argue for keeping that. I see the appeal of getting a new camera, but you might find better ways of improving your results (for example, a new lens) than upgrading your camera. If you can hang on another two years, you'll be able to choose between the D4000 and the D6000!
Edited to add: After I posted I looked at your profile (should have done this before) and see you already have a D300. So I should ask you: Do you see a difference in the results you get from the D40 and the D300? If you want to get D300-quality photos from a smaller camera, get the D5000. But as I say, I'm still using my D50, and in most situations I can't tell the results from those of my D300.