
Yup,
Most dogs have a pretty good memory for bad stuff, as well as the good stuff.
Usually, it depends on the dogs character as to how they use that memory. A confident and happy dog probably wouldnt be that bothered by going to the vets for a jab, if he was previously happy to go, after a painful experience, however a nervous, or underconfident dog might well be more scared.
Then, depending on what kind of dog you have, (nervous, happy, docile, excitable etc) they can develop that memory, and learn how to avoid such a situation again, in your dogs case, by snapping and growling at children (because this effectively keeps them away, either by them not approaching, or by you telling them to go away), and by hiding and being reluctant at the vets.
My own dog Rocky, is a bit of a wimp, however he has a very very gentle character, and has never ever needed to resort to snapping at people to aviod unpleasant things. However, whilst he doesnt bite at the vets, he leaps around like a fool, which makes it nigh on impossible to examine him!
What happens to your dog now depends on how YOU react to his behaviour. If you comfort him, or give him any kind of attention when he is snapping at children, then he may well take that as a reward for behaving that way, and will continue to do it.
The same goes for the vets. If you make a big deal about going there, and reward him (cuddles, there there, vet wont hurt you etc) then he will behave like that again. If you ignore his reluctance, and reward him well for setting foot in the vets, then the chances are he will overcome this fear.
To make that really work though, you will have to take him to the vets lots, feed him treats, or play with him, and move on to letting the vet feed him treats, play etc, without anything nasty happening. That will depend on wether your vet has time to humour you!
Good luck with him,
Emma