I am using 2 sub queries to gain current year and prior year data in my VBA code. I would like to declare the sub queries as tbl1sql and tbl2sql and then use them in a select query later.
eg.
SELECT *
FROM tbl1sql cy INNER JOIN tbl2sql py
ON cy.REC_DATE = py.RECDATE + 365
Can this be done?
Kevin