D
DoDev
Hi,
I need to display multiple instances of the same subform within a single
parent form. Each instance of the subform will display different data.
Thus, the parent form needs to pass an argument (a paramter) to the subform
to indicate what it neeeds to display.
1. The subform query and display is coded with VBA so I don't think I can
use Master/CHild Link fields, unless somehow I would be able to read the
Master/Child fields in the VBA code.
2. I tried to use a tag property for the subform control within the parent
form. So from the subfrom code I can read
Tag = Me.Parent!subfrmControlInstanceA.Form.Tag
Tag = Me.Parent!subfrmControlInstanceB.Form.Tag
However, the above solution assumes that the subform code somehow already
knows that it is executing as instance A or instance B.. So it does not solve
my problem.
3. I could create a separate subform for each invokation instance (brute
force solution) but such solution would entail the pain of maintaining the
code for multiple subforms.
Do you have any ideas how the parent form can pass a different parameter to
each instance of the subform?
Any help wil be very appreciated.
- DoDev
I need to display multiple instances of the same subform within a single
parent form. Each instance of the subform will display different data.
Thus, the parent form needs to pass an argument (a paramter) to the subform
to indicate what it neeeds to display.
1. The subform query and display is coded with VBA so I don't think I can
use Master/CHild Link fields, unless somehow I would be able to read the
Master/Child fields in the VBA code.
2. I tried to use a tag property for the subform control within the parent
form. So from the subfrom code I can read
Tag = Me.Parent!subfrmControlInstanceA.Form.Tag
Tag = Me.Parent!subfrmControlInstanceB.Form.Tag
However, the above solution assumes that the subform code somehow already
knows that it is executing as instance A or instance B.. So it does not solve
my problem.
3. I could create a separate subform for each invokation instance (brute
force solution) but such solution would entail the pain of maintaining the
code for multiple subforms.
Do you have any ideas how the parent form can pass a different parameter to
each instance of the subform?
Any help wil be very appreciated.
- DoDev