A very warm welcome to the CameraLabs forums.
As you can see, I've moved your post to the "Buying a new camera" forum as you are asking for help deciding between the Olympus E-510 and the Nikon D40. Hope you don't mind and hopefully you will get more replies here.
I'm sure you have already found Gordon's reviews of the E-510 and D40 (here
). Additional reading on the forum which might be useful includes:
Unfortunately, most of these threads are discussing the D40x rather than the D40 but I think you should get value from them, particularly if you bear in mind the comparisons between the D40 and the D40x in Gordon's Nikon D40x review
At the risk of overloading you with even
more reading, if you haven't seen it yet have a look at Gordon's Best budget digital SLRs
As always, we strongly recommend that you go down to your local store, if at all possible, and have a play with any models you are considering. To see why, have a look at the two following posts, very generously contributed by Ant1:
Good luck with your decision, and please continue to share your thoughts.