Don't buy a D40. No in-body autofocus and it feels like a toy unless you have a hefty lens on it.
This was once again brought home to me just a couple days ago, as my new Nikon N80 film SLR arrived. It's actually about an ounce or so lighter than the D40, but it feels more solid, is more balanced and has an in-body autofocus. I couldn't figure out why I preferred holding the N80 to the D40 (which I own), and then I figured out why. The D40 has nothing on its top left side. All the controls are on the right side, and so it's less balanced than the N80, which is more split between left, right and center.
I'm big about ergonomics, and it's one reason that I don't think I could ever own a Canon. Nikon's offerings are much better overall (D40/60 aside) in this respect, so far as I've experienced.
My normal camera is a D300, which I love, but it's on its way back to the retailer for autofocus recalibration. In the meantime, I've got my new N80 to take pictures with. Not bad for $70, with tax and shipping included. The N80 has also made me appreciate the virtues of a full frame camera, as my 50mm 1.8 suddenly takes in more than it did before.