I solved this problem by using querydefs
Set db = CurrentDb
Set qdf = db.QueryDefs("qry_exportRS")
For Each prm In qdf.Parameters
prm.Value = Eval(prm.Name)
Next prm
Set rs = qdf.OpenRecordset(dbOpenDynaset)
So far I have successfully exported my query data to a excel sheet by putting an arbitrary id number in the criteria of one of the columns of my query.
Now I am trying to pass that same id number from a form that I have open it is giving me a run-time error '3061': Too few parameters...
I want to export the data from a query into a presentable excel document. It seems the best way to do this is with xml but xml assumes that all of my data is of the repeating element type and I need the data from some fields to only appear once.
Is there a way to specify which fields of my query...