Remove the parent object relationship, add a curve modifier in the modifier stack and type the curve’s name. Then add a Lattice modifier and type the name of the lattice.
It works, but I think the result is not what you expected because the lattice has an effect not only when the moving object passes by.
I suggest you make the lattice travel along with the moving object. Use the curve as a modifier for the lattice. To make the object deform in the right moment use a shape key in the lattice. You can of course make a shape key directly on your mesh and forget about the lattice.
wow , i didnt know you could do curve path and a curve deform with the curve modifier , i didnt even knew it existed.
Thanx ,
but if i use a shape key for the lattice its not the same efect , because the lattice is following the object , it just morphs to that shape while moving , i want the morphing shape to pass trhue .