G
Guest
Hi,
I have a form with a tab control on it, with further forms on two tabs
(Which become subforms of the main form). One of these further forms has a
subform, as follows:
frmMain - Main form
frmTAB1 - Form on first tab page
frmTAB2 - Form on second tab page
frmTAB2sub - Subform on frmTAB2 form
What I need to do is call a subroutine in frmTAB2sub from frmTAB1. It can be
a property let statement even, so long as I can supply 1 variable in the call.
I have spent hours trying to get this to work, and continually run into
syntax / method not available etc... errors. On other forms I can set a
custom property on a subform parent with:
me.parent.propertyname = "Data"
I would have thought:
me.parent.frmTAB2.frmTAB2sub.propertyname = "Data" or
me.parent.frmTAB2.Form.frmTAB2sub.propertyname = "Data"
should work, but doesn't (Including all variations I can think of with .form
used)
Or addressing directly with the likes of:
Forms!frmMain!frmTAB2.Form.frmTAB2sub.propertyname = "Data"
again, including all variations I can think of including .Form!frmTAB2sub...
I even tried creating a property in frmMain which simply passes the value
onto a frmTAB2 property and then passes it onto the final frmTAB2sub. I can
set the frmMain property from frmTAB1, but anything after that causes errors.
The same applies if I try and use the frmTAB2sub routine as a public
subroutine, and try and call it.
Any help is appreciated as I am getting really exasperated.
Thanks in advance.
swas
I have a form with a tab control on it, with further forms on two tabs
(Which become subforms of the main form). One of these further forms has a
subform, as follows:
frmMain - Main form
frmTAB1 - Form on first tab page
frmTAB2 - Form on second tab page
frmTAB2sub - Subform on frmTAB2 form
What I need to do is call a subroutine in frmTAB2sub from frmTAB1. It can be
a property let statement even, so long as I can supply 1 variable in the call.
I have spent hours trying to get this to work, and continually run into
syntax / method not available etc... errors. On other forms I can set a
custom property on a subform parent with:
me.parent.propertyname = "Data"
I would have thought:
me.parent.frmTAB2.frmTAB2sub.propertyname = "Data" or
me.parent.frmTAB2.Form.frmTAB2sub.propertyname = "Data"
should work, but doesn't (Including all variations I can think of with .form
used)
Or addressing directly with the likes of:
Forms!frmMain!frmTAB2.Form.frmTAB2sub.propertyname = "Data"
again, including all variations I can think of including .Form!frmTAB2sub...
I even tried creating a property in frmMain which simply passes the value
onto a frmTAB2 property and then passes it onto the final frmTAB2sub. I can
set the frmMain property from frmTAB1, but anything after that causes errors.
The same applies if I try and use the frmTAB2sub routine as a public
subroutine, and try and call it.
Any help is appreciated as I am getting really exasperated.
Thanks in advance.
swas