Lets forget about the code right now. Can you open the query by double clicking on its name in the Access 2007 user interface? If it opens does it give any records?
Can you zip up a version of your database that doesn't contain any private or personal info (but the query will still return data) and attach it here?