PDA

Click to See Complete Forum and Search --> : Multi-Page Forms


segy
Nov 4th, 1999, 09:07 PM
If I understand correctly, a form can't be sized larger than the screen. Therefore, what is the best method for displaying data that requires an unknown number of additional screens? I've tried child screens, but can't find a way to duplicate the necessary text boxes. This has to be a very common need, but I can't find examples. Please help!

Aaron Young
Nov 4th, 1999, 09:22 PM
One thing you could do is to create a Template for the Form you want to create more of at Runtime, for this example we'll call it Form2, then From Form1 We Can Generate As Many Form2's as we want, e.g

Private oForms() As Form2

Private Sub Command1_Click()
Static iNewFormIndex As Integer
'Enlarge our Dynamic Array of Form2's
ReDim Preserve oForms(iNewFormIndex)
'Create a New Form2 and Assign it
Set oForms(iNewFormIndex) = New Form2
'Set the Caption of the New Form
oForms(iNewFormIndex).Caption = "Form" & iNewFormIndex + 2
'Show the New Form as a Child Form of This Form
oForms(iNewFormIndex).Show , Me
'Increase the Form Index,
'Which Uniquely Identifies each Form.
iNewFormIndex = iNewFormIndex + 1
End Sub



------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net