trying to close one form and display another froma command button but i keep getting this error.

An unhandled exception of type 'System.NullReferenceException' occurred in WindowsApplication1.exe

Additional information: Object reference not set to an instance of an object.

i've tried .show .showdialog and nothing seems to work. first program i've tried to do in .net so there could be something that's changed from 6.0 that i'm missing

if it helps at here here's the code where i get the error trying to show the form

Private Sub CmdEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdEnter.Click
Pass = TxtPassword.Text


If Pass <> passcheck Then
MsgBox("Wrong password enterd", MsgBoxStyle.OKOnly)
Else
Me.Hide()
form2.Show()

End If
End Sub