Essentially both sentences mean the same. Man smelling milk. While the first one actually translates to the man is smelling at the milk(box).
Main difference would be the indication of action in each sentence.
"an der Milch" implies he takes action via leading a cup/box/glass/whatever next...