I was always a 'canon man', for maybe 15 years, though i cut my teeth on old M42 mount stuff (though i think the old FD lenses were far superior to the EF lenses) but have recently defected to nikon, D40 is a very good camera, with some good deals. In truth , there are no 'poor' digitial slr's out there, I would get into the shops, havea chat, try a few, if they arent prepared to spend a sensible amount of time with you, then try another camera shop
what sold the d40 to me was that friends have an eos400d, olympus e500, and nikon d40, we all met up and compared results from the cameras under identical conditions. In outdoor shots, there was very little in it, there was more variation from camera shake than cameras themselves, though the e500 and d40 did have marginally better contrast. we then did some indoor shots, I do a bit from time to time on ebay (jknstaffs), and I wanted a digital slr to have more control over photographs for ebay items etc, as much as anything else. As a subject, we chose a NAD monitor series amplifier, which has a grey front panel, with white and feint red writing screen printed onto it. The nikon was the one that consistently exposed the image with flash 'just so' so everything was legible, and nothing was burned out, the olympus was quite good, but needed adjustment in photoshop, and the canon tended to loose the detail in the writing as it overexposed the flash. This is adjustable on the camera however.
if you buy any of the current digital slr's, they are all competent, but please do try them in the shop, no matter how good the spec, if it's uncomfortable to hold, and you end up with camera shake, any slight technical advantage will be more than lost, the single most thing you can do to improve any image is to ensure the camera does not move during exposure.
happy shopping, digital slr's are in reality astonishing value for money, for example, in around 1994, i bought a new canon EOS100 SLR and it was £600 with a standard zoom (almost a months' wages back then) and the following summer, I bought a 10 year old canon T90 with a 50mm fixed lens, which was £300, the price of nikon d40 now (with cashback, it works out about £270)
Get out there, have a play