We show that the property of flatness of maps from germs of real or complex analytic spaces whose local rings are Cohen-Macaulay is finitely determined. Further, we also show the existence of Nash approximations to flat maps from such germs that preserve the Hilbert-Samuel function of the special fibre.