I had a d40x for a few months and then switched to a d80. The d40 is a cool little camera, and I can recommend it. It's one of the smallest dSLR's out there and weighs next to nothng. The only issue is adjusting aperture in full manual mode, where you have to hold a little button while you spin the adjustement wheel.
Other than that though, if you look you can find a pretty full line up of AF-S or equivalent lenses (Sigma 30mm f1.4, Sigma 10-20, Lots of Nikon glass, just not the 50mm f1.8 and a few other key lenses). It's not as debilitating as some people make it out to be. In hindsight I certainly wouldn't let it deterr me from purchasing the camera, especially for $400.