天逸 just pointed out that it does not work on D40.
I would seriously recommend that you sell your D40 and buy a D40x (assuming it will accept this lens. If not, buy D50 instead). In this way, you are still saving money by buying Tamron 17-55mm f/2.8 instead of Nikon 17-55mm f/2.8. And you can buy 50mm f/1.8 or f/1.4 in the future which are really needed for photographing kids indoors.
