I am writing a fairly complex database that has to perform many queries in an operation, and the design of these queries may change slightly each time the operation is run (monthly), these queries are mainly append and delete queries.
I have a number of access queries saved, and I want to call them from a Module sub. the DoCmd.runSQL only lets me enter straight SQL, which is fine, but i dont want to trawl through pages of SQL code to makea few small changes to about a dozen query calls.
If I saved a query as "Query1" how would I call this from within a VB Module. Ideally I want to avoid using recordsets as im my experiance they are VERY slow in comparison to access queries, especially when i am going to be processing over 36,000 records each time.
Also can I call a parameter query, for example I could have a "FOR count = 1 to 5" loop, run the query each time with count being entered into the query as a parameter.
---
Bottom line, I want to click a button on a form to have access run off and perform these queries in sequence, including a couple of parameter queries based on a for loop, without having to hard code the SQL in VB.
I have a number of access queries saved, and I want to call them from a Module sub. the DoCmd.runSQL only lets me enter straight SQL, which is fine, but i dont want to trawl through pages of SQL code to makea few small changes to about a dozen query calls.
If I saved a query as "Query1" how would I call this from within a VB Module. Ideally I want to avoid using recordsets as im my experiance they are VERY slow in comparison to access queries, especially when i am going to be processing over 36,000 records each time.
Also can I call a parameter query, for example I could have a "FOR count = 1 to 5" loop, run the query each time with count being entered into the query as a parameter.
---
Bottom line, I want to click a button on a form to have access run off and perform these queries in sequence, including a couple of parameter queries based on a for loop, without having to hard code the SQL in VB.