I would like to generate a Form using code based on a variable number of fields. Essentially I am creating code a simple dialog box which sometimes might have 5 fields and sometimes 15. Currently I only know how to manually set each field using:
But what I would really like is to index Me.TextBox? and Me.Label? so I can manipulate it in a loop.
Is this possible?
Thanks,
Jeff
Code:
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.Label2 = New System.Windows.Forms.Label()
.
.
.
etc...
But what I would really like is to index Me.TextBox? and Me.Label? so I can manipulate it in a loop.
Is this possible?
Thanks,
Jeff