Teaching your dog the "Leave it" command is an easy way to make him understand that he is not permitted to grab at food he sees lying around. While you are working with him to teach this command, you need to be particularly conscientious about keeping food picked up and out of reach. Each time he nabs a bite he is rewarded for his bad behavior. It is hard to convince him to leave it when he misses out on a treat from you, but gets half of a turkey sandwich a few minutes later.
Hold a treat out in your hand, in front of your dog.
Close your hand and say, "Leave it" when he goes to take the treat. Don't discipline him if he sniffs or licks your hand, but don't give him the treat either.
Give him a treat from your other hand, when he leaves the first hand, and the hidden treat, alone.
Repeat this process until your dog automatically leaves the treat alone when you tell him to.
Add temptation in the form of food. You still need to control the situation so your dog doesn't sneak a reward. Set a sandwich on the edge of the counter, table or wherever he typically grabs food from. Be conscious of what he is doing, but don't appear to be paying attention. When he makes a move toward the food, tell him to leave it. If he does what you ask, give him a treat, if he continues toward the sandwich, go over and give his collar a gentle tug while you move the sandwich out of the way. Repeat, changing the location and type of food you leave lying around, until he doesn't pay attention to the food at all.