Let's say that before executing a query, you need to chew the data a bit (Create temporary tables with calculations of m n), so that you can later look at some table on them. Is it possible to do this somehow through the module? Ie, I cut in the macro, it creates the necessary tables for me, and then at the end a query for the Select is executed and a window opens with a selection?

Yes, you can do without tempo tables, using, say, subqueries, but performance may suffer. Yes, you can do the preparatory requests with your hands, but if there are 5 of them, then it is inconvenient ...

    1 answer 1

    You can create queries to create tables based on a sample. Access in this case generates a query of the select [field1] from [table1] into [temptable] .
    It is possible in the code through RunSQL to simply execute such sql queries.
    And then you drive everything into a macro / VBA code and execute it in the right order.