swapping data between forms

SimDuck

Newcomer
Joined
Oct 25, 2004
Messages
21
Hi, I’m having a problem accessing a sub routine between forms

I have three forms
FormA
FormB
FormC

FormA calls FormB modally (with backwards data links) and FormB calls FormC modally (with backwards data links)

My problem is that I have a sub routine in FormC that needs to access a public sub routine in FormA and then have some data returned.

I have tried:
(FormC’s sub routine)
Dim frmFormA as FormA (FormA has no sub new declarations)
frmFormA.subroutine(declarations)

When I call FormA’s subroutine, FormC exits and shows FormB modally.

I don’t want to declare a new FormA in FormC as I need to have access to the data stored in FormA.

How do I declare FormA i(with current data) n FormC, access a sub routine in FormA and then return the data to FormC’s sub routine?

Thank you
 
Thank you PlausiblyDamp.

The link was a big help. What I didn't do was set up FormC to receive both Form A&B in the sub new. I only had FormB in there.

I realised I needed to pass reference to both FormA & FormB to FormC's sub new from FormB.

Thank you again
 
Back
Top