This VBA class helps you work with temporary tables in Access VBA projects: DAOTemporaryTableController.cls. You may need to do so if you want to join using a subquery as criteria, which Access does not allow.