For indoor, you will be better off with a wider lens, eg. AFS 18-70mm or AFS 18-55mm.
Do note that the D40x does not auto-focus with non-AFS Nikon lenses, so you will need to focus manually if you get an AF 50mm f1.8.
Ideally, if you have the moola, AFS 18-200mm VR would be great.
You...