Possible? Refer to Sub using string? (1 Viewer)

elliotgr

Registered User.
Local time
Tomorrow, 00:53
Joined
Dec 30, 2010
Messages
67
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-:

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
.........
 

Users who are viewing this thread

Top Bottom