Gary,
Nikon makes correction eyepieces in a range of diopters from -5 (for nearsightedness) to +3 (for farsightedness). These come in both round and rectangular shapes—it’s the rectangular shape that will fit your D40. These are fairly inexpensive--
$15 apiece at B&H.
The D40’s built-in diopter adjustment is comparatively modest—just -1.7 to +0.5 diopters. So one of these add-ons might make a big difference for you.
By the way, don’t blame your eyes for all your difficulty--part of it is likely due to the low-quality of the D40 viewfinder. It uses a pentamirror, which is darker than the pentaprism used in higher-end Nikon bodies. Also, it has a magnification factor of 0.75x, compared with something like 0.94x for a step or two higher in the Nikon line.
My dad has a Nikon D40x, which he bought when I was shooting the much more expensive D200. These bodies have the same sensor, and with the same lens on the same settings, produce identical results. However, I found his D40x much more difficult to use. In particular, the viewfinder image seems dark and small—unpleasant to frame with, and very difficult to focus with.
--Chris