David McAfee
davidmcafee at gmail.com
Fri Jan 27 14:32:15 CST 2012
wrap eval() around it: call eval(MyReport & "_Compound_Filters") On Fri, Jan 27, 2012 at 12:21 PM, Brad Marks <BradM at blackforestltd.com>wrote: > 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 > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >