NeuronRider
Registered User.
- Local time
- Today, 15:53
- Joined
- Mar 8, 2005
- Messages
- 14
Kind of a strange one here.
I know how to create the instances, but I don't then know how to refer to them to set the new instance as the Source Object of a subform control.
For example, I have a form with a tab control consisting of 19 different tabs. Each tab needs to display a different record of the same table. My intent is to use the same form for this each time. Here's a snippet of what I came up with:
I've exluded the rest of the Select and For loops.
Using this structure, I get a type mismatch, which makes perfect sense to me. I'm trying to assign a form object to what is essentially going to need to be a string value. From what I can figure, what I really need to do is get the instanced form's name and use that for my Source Object declaration.
Any ideas are appreciated. This thing's been giving me a headache all day
I know how to create the instances, but I don't then know how to refer to them to set the new instance as the Source Object of a subform control.
For example, I have a form with a tab control consisting of 19 different tabs. Each tab needs to display a different record of the same table. My intent is to use the same form for this each time. Here's a snippet of what I came up with:
Code:
Dim SummerQForm As Form
Select Case intPic
Case 0
q = 1
For n = LBound(SummerQs) To UBound(SummerQs)
Set SummerQForm = New Form_frm_QuestionSub
frmName.Controls("Q" & q).SourceObject = SummerQForm
I've exluded the rest of the Select and For loops.
Using this structure, I get a type mismatch, which makes perfect sense to me. I'm trying to assign a form object to what is essentially going to need to be a string value. From what I can figure, what I really need to do is get the instanced form's name and use that for my Source Object declaration.
Any ideas are appreciated. This thing's been giving me a headache all day