I know this seems like a very noobish question and has probably been asked many times before, I'm trying to write a lottery program in which the numbers are generated, then you can check your numbers. There is a command button on the first form which says "Check Numbers" and this would take you onto the second form. Can anyone help me by telling me how to bring this up by clicking the command button? Thanks.

type this code in your command button click event:

Form2.Show

Private Sub Command1_Click()
    Form2.Show
End Sub

If you press the Command1 button it will automatically show the another form..

Great guys, thanks a lot! I appreciate it!

To do what you want do the following
Private Sub Command1_Click()
Form2.Show
End Sub
NB: if you have given your second form a name write that name instead of form2
Hope i've helped.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.