I have a table in which the data changes each month. For example, Nov data has 11 months of data in it. I need to process each of the month separately and then merge them back together. So for example, Nov data will have 11 queries and one query to merge them back. However, now I want to automate this process. So the user just needs to enter how many months in the data.

First, I thought about docmd.openquery, however, it cannot filter the month and even if I can, only the last one will be saved. So, I thought about creating a recordset. However, I am not sure if I can produce the recordset dynamically (11 recordsets in this example). Even if I can, I don't know how to merge recordsets.

Does anyone have any suggestion ?

Can OpenQuery get criteria input ?