Dear Manicshaw and kulrom...
thanx a lot for help..
I m designing a payroll system...for my company..
In that i m having a main frame and in that frame 6 command buttons to switch between different different forms...
here is the code..
*****************************************************
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
PayRoll_Main.Hide()
Emp_Det.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
PayRoll_Main.Hide()
Emp_PaySlip.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
PayRoll_Main.Hide()
Emp_SalDet.Show()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
CrystalReport3.Action = 0
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
PayRoll_Main.Hide()
Emp_YearDet.Show()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
End
End Sub
******************************************************
here is the error generated....look at the last error..
C:\Documents and Settings\Santosh Singh Rawat\My Documents\Visual Studio Projects\PayRoll\PayRoll_Main.vb(163): Reference to a non-shared member requires an object reference.
C:\Documents and Settings\Santosh Singh Rawat\My Documents\Visual Studio Projects\PayRoll\PayRoll_Main.vb(164): Reference to a non-shared member requires an object reference.
C:\Documents and Settings\Santosh Singh Rawat\My Documents\Visual Studio Projects\PayRoll\PayRoll_Main.vb(168): Reference to a non-shared member requires an object reference.
C:\Documents and Settings\Santosh Singh Rawat\My Documents\Visual Studio Projects\PayRoll\PayRoll_Main.vb(169): Reference to a non-shared member requires an object reference.
C:\Documents and Settings\Santosh Singh Rawat\My Documents\Visual Studio Projects\PayRoll\PayRoll_Main.vb(173): Reference to a non-shared member requires an object reference.
C:\Documents and Settings\Santosh Singh Rawat\My Documents\Visual Studio Projects\PayRoll\PayRoll_Main.vb(174): Reference to a non-shared member requires an object reference.
C:\Documents and Settings\Santosh Singh Rawat\My Documents\Visual Studio Projects\PayRoll\PayRoll_Main.vb(178): 'Action' is not a member of 'PayRoll.CrystalReport3'.
C:\Documents and Settings\Santosh Singh Rawat\My Documents\Visual Studio Projects\PayRoll\PayRoll_Main.vb(182): Reference to a non-shared member requires an object reference.
C:\Documents and Settings\Santosh Singh Rawat\My Documents\Visual Studio Projects\PayRoll\PayRoll_Main.vb(183): Reference to a non-shared member requires an object reference.
'Sub Main' was not found in 'PayRoll.Form1'.
reagards,
Santosh.