I have a table tbl_Enabled_Routines containing the names of Subroutines and an Enabled field.
When I reference the table I want only the enabled subroutines to run.
Sample code-:
When I reference the table I want only the enabled subroutines to run.
Sample code-:
Code:
Sub runEnabled_Routines
dim db as database
dim rst as recordset
set db = currentdb
set rst = db.openrecordset("tbl_Enabled_Routines")
with rst
.movefirst
do until .eof
if rst!Enabled = true then
'Somehow use the value in rst!SubRoutineName to indicate the sub that must be run
'I don't want Select case or if statements, as the code must be independent of the data in the table
.movenext
loop
.........