Results 1 to 4 of 4

Thread: one for to another using command buttons

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2002
    Location
    canada
    Posts
    28

    one for to another using command buttons

    how do you make a command button to go from one form to another?

  2. #2
    In the Click event:
    VB Code:
    1. Form2.Show
    If Form2 must be closed before the user can go back to Form1, then
    VB Code:
    1. Form2.Show vbModal

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2002
    Location
    canada
    Posts
    28
    thanks alot man, but i tryed the

    form2.show vbmodal

    and i got a runtime error, i changed form2 to the form name but i got it wrong, could you go into more detail about going from the starting form to another form and back to the starting one, thanks again
    Last edited by dave11; Apr 8th, 2002 at 08:39 PM.

  4. #4
    Hyperactive Member ZeroCool's Avatar
    Join Date
    Feb 2002
    Location
    In front of my computer
    Posts
    423
    Code:
    Private Sub Command1_Click()
    Form2.Show
    End Sub
    The Code Above Will Leave The First Form In The BackGround And Load Form2

    The Code Below Will Leave the First Form In The BackGrond But It Wont Let You Do Anything On The First Form

    Code:
    Private Sub Command1_Click()
    Form2.Show Vbmodal
    End Sub
    Form2 Is The Second Form The One That Will Popup When Command1 Is Clicked.

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