If you find yourself in a situation where your dog won't respond to a cue, and you're sure he knows it in other situations, think about what is different about the situation. It could be that there are too many distractions for your dog to focus, or it could be that the situation is vastly different from training situations in the past.
Go back to basics when this happens. Remove distractions if you can, and re-introduce them slowly. Start at the beginning in a new situation, even if it means using a food lure briefly in order to get the behavior. If there's too much going on, move away from the action a bit.
Remember to set your dog up for success. If your dog can't succeed, you can't reinforce. If you can't reinforce, nothing useful has been learned.
Make sure your rewards are meaningful. Reinforcement is only reinforcement if it increases or maintains behavior. A satiated dog offered lousy treats, or a dog-tired dog offered a chance to chase a ball is probably not going to be too interested in training.
And remember to quit while you're ahead. If you train for too long you'll get sub-standard behavior. Reinforcing sub-standard behavior will only produce more sub-standard behavior in the future.