You'd be better with a second hand D50 or D70s. The D40 is a stripped out D50 aimed at those that want an upgrade from point and shoot but don't want to develop their photography. You've limited to a few lenses that will work with the D40 autofocus because it has no focus drive motor built in. You have some other features missing, you can't change exposure steps.
It's basically a good little camera and can take some lively shots. It all depends on whether you want to progress in photography or not.