Hi everybody,
[Access 2010]
I'm not sure if this is possible or not, but I wanted to check to be sure.
I'm working with a database that depends on running a bunch of tables through a number of different queries (including make-table queries). This happens a number of different times throughout the database as data is compiled for different sections.
Due to the inefficiency of this process, I'm trying to automate everything. Seeing as how the process depends heavily on the order of operations, I thought that creating a Main() subroutine that would call all the other subroutines/functions would be a good way to keep things organized.
Another thing I'm trying to do to debug is print a message when the next subroutine in the process is run with a little message about the status. I thought that I might be able to pass the subroutine/function name to another subroutine/function as a string, use the string in a "debug.prin t" to display a message, then use Call with the string variable to call the subroutine/function.
So, here's an example of what I'm trying to do:
I get a compile error at "Call strSubroutine". Is there anything I can use to replace this with so I can call the subroutine and still use the string in "Debug.Prin t"??
Thanks,
beacon
[Access 2010]
I'm not sure if this is possible or not, but I wanted to check to be sure.
I'm working with a database that depends on running a bunch of tables through a number of different queries (including make-table queries). This happens a number of different times throughout the database as data is compiled for different sections.
Due to the inefficiency of this process, I'm trying to automate everything. Seeing as how the process depends heavily on the order of operations, I thought that creating a Main() subroutine that would call all the other subroutines/functions would be a good way to keep things organized.
Another thing I'm trying to do to debug is print a message when the next subroutine in the process is run with a little message about the status. I thought that I might be able to pass the subroutine/function name to another subroutine/function as a string, use the string in a "debug.prin t" to display a message, then use Call with the string variable to call the subroutine/function.
So, here's an example of what I'm trying to do:
Code:
'Main subroutine ''''''''''''''''' Public Sub Main() StartSub "SelectProviders" StartSub "RunProviderUpdate" End Sub 'StartSub subroutine ''''''''''''''''''''' Public Sub StartSub(strSubroutine as String) Debug.Print strSubroutine & " started..." Call strSubroutine Debug.Print strSubroutine & " complete." End Sub
Thanks,
beacon
Comment