i do usualy use auto but im starting to use manual setup and on some pics im still getting probs, yep most of the time its in low light but im told the better cams work better in low light conditions and are sharper over all light levels
The D40 is, in my opinion pretty good with noise. It's more likely that any loss of sharpness is either due to the lens, or technique. At a given ISO, it's better than my D200 by a long way. Obviously it's nowhere near as good as a D3, but I'd be tempted to stick with it for a while.
Take a few shots witht the ISO set at 200, and see if it improves. Low light and Auto ISO can cause it to increase, and therefore you'll get a noisy image.
All I would say is that if you have some money burning a whole in your pocket, you may be better off getting new lenses, rather than a new camera - or if you are taking a lot of pictures indoors, a proper off camera flash or two. You could invest in something which is "known" for being sharp - like the relatively cheap 50mm f1.8 (you'll need to focus manually though, and on a D40 it's not that easy), but if you do decide to move up to a higher spec body, the lens is good enough to go with you.
As for technique (regarding the sharpness) try using a tripod - I have the same issue - I just don't have a steady enough hand, and I end up using faster shutter speeds than I should, to overcome the shake (it's un-noticable to the naked eye but is obvious in my hand held pics)
Just my 2 pennies....