Results 1 to 2 of 2

Thread: Multi-Page Forms

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 1999
    Location
    Lakewood, CO
    Posts
    9

    Post

    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!

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    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
    Code:
    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
    [email protected]
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width