loop to run queries to update table

dfishfan

New member
Local time
Yesterday, 19:22
Joined
Jul 9, 2010
Messages
7
Ok i have s series of queries in need to run multiple times, they need to run for a set time period.
The queries are running calculations for staffing numbers, the numbers are updated and evaluated each month for a set number of months.
the time line is set during form open from a table. An example of the queries that need to run are:

DoCmd.RunSQL STRSQL8
DoCmd.OpenQuery "qryPopRedSavN1u", acViewNormal, acEdit
DoCmd.OpenQuery "qryPopRedSavN2u", acViewNormal, acEdit
DoCmd.OpenQuery "qryPopRedSavN1au", acViewNormal, acEdit
DoCmd.RunSQL STRSQL7
DoCmd.RunSQL STRSQL10
DoCmd.OpenQuery "SetVacNoActivityNeg", acViewNormal, acEdit
DoCmd.OpenQuery "qrySetVacNoActivity", acViewNormal, acEdit
'DoCmd.RunSQL strSQL18
'insert setvacnoact query
DoCmd.OpenQuery "qrySetVacMonth", acViewNormal, acEdit
DoCmd.RunSQL STRSQL8
Any help how to set up to run with loop to run for the required number of months will be much help
 

Users who are viewing this thread

Back
Top Bottom