This is a very common topic in the Access world, your query probably makes reference to a form control(s) and VBA cannot resolve that. You can try to wrap those (in the Query2 design view) with the Eval() function and see if it works or use the qdf.Execute method of the QueryDef object:
Code:
Dim qdf as DAO.QueryDef, db as DAO.database, prm as Parameter
Set db=CurrentDb
Set qdf = CurrentDb.QueryDefs("Query2")
For Each prm In qdf.Parameters
prm.Value = Eval(prm.Name)
Next prm
qdf.Execute dbFailOnError
Cheers,