What is the highest capacity SDHC memory card that will work in my Nikon D 40 camera?
According to Nikon's support page, Approved SD cards for D40, 4 GB is the highest-capacity supported SDHC cards. And note, "Other brands and capacities of cards may work, but Nikon cannot guarantee their operation."
I use an 8Gb Sandisk Ultra II SD card in my Nikon D40. I have had no problems with this.