-
When I click a command button, I want it to open up a new form. Code for that?And how do I make sure the second(3rd, 4th) form doesn't open up when you start the program? I could really use help becuase I am stuck in a program I am making. So, thanx anybody.
[Edited by andymannewbie on 08-24-2000 at 10:04 AM]
-
the proptery for form is:
form1.show ' shows form 1
form2.show ' shows form 2
form1.hide ' hides form 1
form2.hide ' hides form 2
unload form1 ' unloads form 1
unload form2 ' unloads form 2!
so to show form 1 when button1 is clicked:
private sub command1_click()
form1.show
end sub
so to hide form 1 when button1 is clicked:
private sub command1_click()
form1.hide
end sub
-
I totally feel your pain about being new to VB. I just started myself, but I can tell you what I know!!
It's real easy to open a form. Say you want to do it under a button on form1 to open form2
=-=-=-=-=-=
Private Sub Command1_Click()
form2.show
End Sub
And to answer your other question, check your Modules, and make sure that there is nothing there that is opening up your other forms. It sounds to me that there is. Hope I helped!
~Brian
-
When you start your program, only the StartUp object is loaded so you don't need to worry about 2nd, 3rd, 4th etc. Forms loading.