T
tina
hi folks.
i have a process where multiple action queries are run sequentially to
generate data for a report, including some make-table queries. this process
is used repetitively, so the tables that are created by the make-table
queries already exist after the first "run".
when a make-table query is run manually, then of course a msgbox pops up
warning that the pre-existing "new" table will be deleted and asking if you
want to continue. however, when you automate the "run queries" process by
using the Currentdb.Execute method in a procedure and looping through a list
of action queries, the procedure simply errs out at the make-table query, as
Error 3010: Table 'NewTableName' already exists.
i got around this by trapping the error, and using DoCmd.OpenQuery, with
warnings turned off (and back on), and then moving back to the Loop code
with Resume Next.
all of the above works without error, but i'm wondering if there is a
downside or potential problem to using the OpenQuery solution, that i'm not
aware of. or perhaps a better way to handle the issue, altogether. one note:
i can't alter the basic process of using action queries to generate report
data; the scope of my task is to automate the "run queries" process.
i'd appreciate any comments, suggestions, or critique y'all would care to
offer.
thx
tina
i have a process where multiple action queries are run sequentially to
generate data for a report, including some make-table queries. this process
is used repetitively, so the tables that are created by the make-table
queries already exist after the first "run".
when a make-table query is run manually, then of course a msgbox pops up
warning that the pre-existing "new" table will be deleted and asking if you
want to continue. however, when you automate the "run queries" process by
using the Currentdb.Execute method in a procedure and looping through a list
of action queries, the procedure simply errs out at the make-table query, as
Error 3010: Table 'NewTableName' already exists.
i got around this by trapping the error, and using DoCmd.OpenQuery, with
warnings turned off (and back on), and then moving back to the Loop code
with Resume Next.
all of the above works without error, but i'm wondering if there is a
downside or potential problem to using the OpenQuery solution, that i'm not
aware of. or perhaps a better way to handle the issue, altogether. one note:
i can't alter the basic process of using action queries to generate report
data; the scope of my task is to automate the "run queries" process.
i'd appreciate any comments, suggestions, or critique y'all would care to
offer.
thx
tina
