i got this problem while trying to compile this code
Public Class Form2
Dim db_classobj As Object
Dim textboxobj() As TextBox = {TextBox1, TextBox2}
Dim datagridobj() As DataGridView = {DataGridView1}
Dim temp As New db_class(textboxobj, datagridobj, "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=datamhs.accdb", "mhs", "ksmhs")
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
db_classobj = temp
End Sub
End Class
while its compiling, i got this error message :
An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object.
whats wrong with my code? can someone fix it? i really appreciate it. thanks.