[AccessD] Is it Possible to Have a Variable in a VBA "CALL" Statement?

Brad Marks BradM at blackforestltd.com
Fri Jan 27 14:21:30 CST 2012


All,

I am experimenting with building a generic routine that will in turn
call other routines based on a variable.

The following statement works nicely of course. 

Call Report100_Compound_Filters



However, I would like to able to do something like shown below so that I
can plug in the first part of the name (such as "Report100")

DIM MySub as String

Dim MyReport as String

MyReport = "Report100"

MySub = MyReport & "_Compound_Filters"

CALL MySub

~~~~~~~~~~~~~~~~~~~~~

This CALL does not work, but I thought that perhaps there is some sort
of method to accomplish this with VBA.

Thanks,

Brad



More information about the AccessD mailing list