Working on Computer Based Test (CBT) which has two interface, teacher's login where they set questions, edit and update questions, delete questions and as well create subject. The other interface is the student corner where they answer questions set by teachers, question marked and score...
On the teacher's question create section, I have a textbox called TEACHERQUST.txtNewSUBJECT_Ts2.Text, and a button (btnCreate).
Please I need a clear code to my sub (NEWSubFORM), whenever any subject is created, my database to reload/refresh in order to be detected by my form without closing the application.
I did this on my module...
Public Sub NEWSubFORM()
Dim NewSubFORM, sqlSF As String
Dim dsNew As New DataSet()
NewSubFORM = TEACHERQUST.txtNewSUBJECT_Ts2.Text
If NewSubFORM = "" Then
Exit Sub
Else
sqlSF = "select * from " & NewSubFORM
da = New OleDb.OleDbDataAdapter(sqlSF, con)
da.Fill(dsNew, NewSubFORM)
Dim NewTable As String
Dim sqlNT As String
NewTable = NewSubFORM
sqlNT = "select * from " & NewTable
da = New OleDb.OleDbDataAdapter(sqlNT, con)
da.Fill(ds, NewTable)
End If