I am working in Access using VBA. I am trying to execute a statement containing a docmd clause. The statement will contain a variable. The variable will be either docmd.openform or docmd.openquery. I can't use an IF or CASE to determine which prefix.
I've tried something along the following:
tmpStr = docmd.openform "blah"
docmd.execute tmpStr
I need the full docmd statement to be in the variable. I just don't know how to execute the variable.
Thanks for all your help!