i am thinking of buying the Nikon D40...any good or bad about it?

All the reviews I've read show it to be a very good camera, although it had now been overtaken by the Nikon D40x.
If I remember correctly, the focussing mechanism is different from othe Nikon cameras, and so will not take the whole range of Nikon compatible lenses - only ones that have the appropriate 'widget' for a D40 - which might restrict the choice somewhat. But trhis is from memory of reading some reviews and so you might check it out.
David
It's all good, an excellent camera particularly for an armature photographer I have had one for about 6 months now. If you want to read a in-depth review check out dPreview.
Dr David is correct, the D40 has the focus motor in the lense itself, which is different from the older models where the motor is in the camera body. Therefore the older, cheaper (more affordable) lenses will work, however the auto-focus will not, you have to manually focus the camera.