Hi all,
I know that inserting the data to table, had to use sql statement, but I am not sure how do i execute them? After writing all this.
Sub DB_Connect()
Dim db
Dim sql As String
db = "C:\Documents and Settings\HoRiZoN\Desktop\Eleave_convert.mdb"
DataConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source =" & db
DataConn.Open
End Sub
Sub update_table()
Dim sql As String
sql = "Insert Into Application (nric, name, leave frdate, leave todate, email, total date, leave type )" _
& "Values ('" & strEmpNo & "','" & strEmpName & "','" & frmDate & "','" & lastDate & "','" & noDays(frmDate, lastDate) & "','" & typeNo & "')"
End Sub
Thanz for your help. I am still a beginner.
I know that inserting the data to table, had to use sql statement, but I am not sure how do i execute them? After writing all this.
Sub DB_Connect()
Dim db
Dim sql As String
db = "C:\Documents and Settings\HoRiZoN\Desktop\Eleave_convert.mdb"
DataConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source =" & db
DataConn.Open
End Sub
Sub update_table()
Dim sql As String
sql = "Insert Into Application (nric, name, leave frdate, leave todate, email, total date, leave type )" _
& "Values ('" & strEmpNo & "','" & strEmpName & "','" & frmDate & "','" & lastDate & "','" & noDays(frmDate, lastDate) & "','" & typeNo & "')"
End Sub
Thanz for your help. I am still a beginner.