For an earache, just turn a hairdryer on low, and hold it a good foot or so away from the babys ear. this usually calms down a baby who has an earache. Just a few minutes, maybe 10 at the most. I dont know if its the warmth or the sound, but it works.
Running the vaccum cleaner can also help with babies, too.
Sometimes 'cry it out' is the best remedy, if you use it consistently for a week or so. Babies usually need to learn to pacify themselves. Children, too, sometimes. Even with shots. Acknowledge their pain. Saying 'That hurts' shuts my kid right up, within minutes of a shot. If I told him 'Stop crying- its not THAT bad' then he would continue crying, but only because his feelings werent acknowledged, and this can also have a long term effect, too, making them feel like you dont care about their feelings.
Be sure to check on the children every few minutes, and make sure there is not something seriously wrong, like an injury.
I like to avoid the crying altogether. I suggest 'How to talk so Kids will listen and Listen so kids will talk'. Its a great book, and it helped me and many friends of mine a lot.