I have several queries already defined. I am able to playback all the action queries using a simple autoexec Macro.
However I wish to run or execute these queries in a Module, so that I can do more .. like Error checking or creating a text file of the success or time it took to run.
Problem is I tried
DoCmd.OpenQuery
but it appears to be needing a form parameter.......
DoCmd.RunSQL
but then it appears I have to retype the whole syntax for the query again
..Does anyone have a simple code example to just execute the action query in the VBA module without retyping it ..since all the queries are already predefined.
say my action queries are called
qry1 (creates new table)
qry2 (inserts records)
However I wish to run or execute these queries in a Module, so that I can do more .. like Error checking or creating a text file of the success or time it took to run.
Problem is I tried
DoCmd.OpenQuery
but it appears to be needing a form parameter.......
DoCmd.RunSQL
but then it appears I have to retype the whole syntax for the query again
..Does anyone have a simple code example to just execute the action query in the VBA module without retyping it ..since all the queries are already predefined.
say my action queries are called
qry1 (creates new table)
qry2 (inserts records)