Looking at the query string I would expect it to work assuming that name contains a valid string that appears in the data and that all the object names are correct.

As suggested copy the query into access and test it or add a msgbox to display the query string so you can see the actual string being passed at runtime.