I have an Access database that I use for reporting. After I do the initial load of raw data, I have to run some create-queries to create some cache tables (to make forms run faster) and then run some updates on some secondary tables. If requested, I run a macro that creates almost a dozen of these look-up tables.
The problem I face is that executing these statements always results in a dialogue box asking me to confirm that running the create-query will delete the old table, warning me that there is not enough disc space / memory to undo (I think this is an internal Access problem, my workstation has plenty of physical resources), asking me if I really want to pase 1485672 rows into a new table… and it does this for every query. Is there any way to set a default answer for all of these statements so I can just execute the main macro and walk away for half an hour, instead of stitting and baby-sitting the stream of dialogue boxes? Ideally, I’d like to see the output in a console window or log file but I don’t know if that is easily done.
Some of the create-table queries are execute directly from the macro, but some have more logic and are executed in code (DoCmd.RunSQL "..."). I have this problem with both types of queries. Same problems with update statements (as update-queries and also executed as SQL in code), and also with deletes.
Execute:
You will not get (most?) warnings.
As a bonus, you can check records affected.