Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Vb

  1. #1
    New to the CF scene
    Join Date
    May 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Vb

    I'm currently trying to code this VB script with allowed's me to load up another VB box with all the data from the first box in the other box.. how can I do that?

  • #2
    New to the CF scene
    Join Date
    May 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I got it to exit out of it self but not load the second dialog

    Code:
    Private Sub ComButton1_Click()
       'Hide Dialog One
        Unload D1
        'Load Dialog Two
        Load D2
    End Sub

  • #3
    Super Moderator sage45's Avatar
    Join Date
    May 2002
    Posts
    1,060
    Thanks
    0
    Thanked 13 Times in 13 Posts
    Well you have to think logically...

    When you unload the original box, you no longer have a call to load the second box in memory... To accomplish what you are wanting to do there are a couple of things you can do...

    First scenario:

    Load the second dialog and make the first dialog disabled... When you do this, have the second dialog grab the information you need and then close the first dialog from the second dialog (this is usually the easiest and cleanest way to acomplish this and is generally preferred by programers)...

    Second scenario:

    Load the second dialog from the first dialog, transfer the information from within the first dialog to the second dialog, then close the first dialog from the first dialog... (more confusing and a little dirtier)

    HTH,

    -sage-
    HTML & CSS Forum Moderator

    "If you don't know what you think you know, then what do you know."
    R.I.P. Derrick Thomas #58
    1/1/1967 - 2/8/2000

  • #4
    Regular Coder
    Join Date
    Dec 2003
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Loading a form isn't enough, it just loads the form into memory. You forgot to show the form (D2.Show).

    shmoove


  •  

    Posting Permissions

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