Multiple Instances of Child Form on Tabs |
Post Reply |
Author | |
wrhaynes
Newbie Joined: 08 December 2007 Location: United States Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 08 December 2007 at 1:10am |
Hello. I am using the TabControl within VB6 to allow the user to enter multiple instances an entity for a record. I created a form which contains the controls to collect data about each instance of the entity, and I use the code below to create new tab items so that the user can enter details for each instance of the entity.
'Create new instance of entity on form
Dim strTabCaption As String I know that I could create pageEntityInfo1, pageEntityInfo2, etc. and limit the number of Entity instances the user can add for each parent record, but I would prefer to re-use one form (pageEntityInfo) and allow the user to enter 'n' instances.
Thanks for your help!
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Think you have add Array variable and add all forms to it.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
wrhaynes
Newbie Joined: 08 December 2007 Location: United States Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Thanks, Oleg. I'll try that.
|
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
I think, pageEntityInfo is a form-object.
You can do this:
dim xForm as Form
for each xForm in Forms
if typeof xForm is pageEntityInfo then
' do anything
endif
next
|
|
wrhaynes
Newbie Joined: 08 December 2007 Location: United States Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Thanks for the reply, Baldur. That will work since I don't need to know which instance of the form I am on...I am saving the data on each instance. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |