If you are running an MSquery, I think you will need to extract the SQL staement and build it freehand within the code 'cos if not, all the fields / parameters / criteria etc are contained within the dqy file and therefore not referenced in the macro itself
HTH
Geoff