This is what I have for running the action queries:
Private Sub cmdCreateTemplate_Click()
Dim SQL As String
SQL = "INSERT INTO tblTasks_Group ( TaskID, CountofCitations, TaskTitle ) " & _
"SELECT TblTaskCitations.TaskID, Count(TblTaskCitations.TaskID) AS CountOfTaskID, tblTasks.[Task Statement] " & _
"FROM tblTasks INNER JOIN TblTaskCitations ON tblTasks.TaskID = TblTaskCitations.TaskID " & _
"GROUP BY TblTaskCitations.TaskID, tblTasks.[Task Statement]; " & _
"INSERT INTO tblRulesMap ( TaskID, TaskTitle, CountofCitation, Rule, RequirementCitation ) " & _
"SELECT tblTasks_Group.TaskID, tblTasks_Group.TaskTitle, tblTasks_Group.CountofCitations, TblTaskCitations.Rule, TblTaskCitations.[Requirement Citation] " & _
"FROM tblTasks_Group INNER JOIN TblTaskCitations ON tblTasks_Group.TaskID = TblTaskCitations.TaskID; " & _
"INSERT INTO TaskUploadTemplate ( ID, [Assigned Entity], [Task Statement], [Task Description], [Apply Continual/Event Driven Prefix], [Enable Deviation Tracking], [Tracked vs Untracked], [Initial Due Date], [Task Frequency], [Use Default Email Notifications], [Task Owner - Individual], [Task Owner - Team], [Task Supervisor - Individual], [Task Initiator - Individual], [Task Supervisor - Team], [Task Group - Legal vs Monitoring], [Task Group - Contractor Performed], [Task Group - Legally Required Training], [Task Group Other 1], [Task Group Other 2], [Task Group Other 3] ) " & _
"SELECT tblTasks.TaskID, tblTasks.Enterprise_Entity, tblTasks.[Task Statement], tblTasks.[Task Description], tblTasks.[Apply Continual/Event Driven Prefix], tblTasks.[Enable Deviation Tracking], tblTasks.[Tracked vs Untracked], tblTasks.[Initial Due Date], tblTasks.[Task Frequency], tblTasks.[Use Default Email Notifications], tblTasks.[Task Owner - Individual], tblTasks.[Task Owner - Team], tblTasks.[Task Supervisor - Individual], tblTasks.[Task Initiator - Individual], tblTasks.[Task Supervisor - Team], tblTasks.[Task Group - Legal vs Monitoring], tblTasks.[Task Group - Contractor Performed], tblTasks.[Task Group - Legally Required Training], tblTasks.[Task Group Other 1], tblTasks.[Task Group Other 2], tblTasks.[Task Group Other 3] " & _
"FROM tblTasks; "
DoCmd.RunSQL SQL
End Sub
This part is working, I just need to add some code at the end for running the following sub functions that I have written:
Sub zerolength()
Sub RulesNumberingAndPaste()
Sub OperationalControlsPaste()
Sub DumpAOPRules()
Sub CountTotalRules()
--All of these subs are in a module called modRulesandOpControlsCode
Can you help me with the code needed to call or run these 5 subs?
Thanks!