Forget about the pre-programmed modes.. If you are going to do justice to this camera (or any other DSLR for that matter), you will have to stop using it as a fancy point-and-shoot and actually learn a bit about photography.. Read the manual, and try Nikon's Digitutor online video manual for the D40- they'll teach you a lot about the camera..
That said, if the events are outdoor sports, use "S" mode (shutter speed priority) and dial up at least 1/320th shutter speed (if it's really bright outside, you can go as fast as 1/1000th, but I've seldom needed that kind of shutter speed- I'm usually hovering around 1/500th) and shoot away.. Indoors are another story.. Unless you have an F2.8 constant aperture lens (ie, a lens that cost more than 3 of your camera), you're likely going to have some problems.. Your best bet in this case is to dial up the ISO to 1600 and try to keep the shutter speed to at least 1/125th, although you'll likely still have some blur and the photos may start getting a bit grainy..