troubleshooting Question

Call subroutine from another form using string ms access

Avatar of repco
repco asked on
Microsoft AccessVisual Basic Classic
10 Comments1 Solution132 ViewsLast Modified:
hi i cannot find this solution anywhere!! i'm trying to call on a subroutine from another form.

for example form A contains command7_click ( i made it public sub routine) and i want to call that command7_click from another form (form b). i can easily call it by using forms!formA.command7_click but the command7_click is a string on formb as i'm trying to pass what subroutine will be used to form b.
usecommand = "command7_click"

how can i call command7_click from FormB using string variable?

application.run command7_click will not work.
forms!formA.usecommand does not work
form!formA(usecommand) does not work
eval(usecommand) does not work
please help!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros