Hi,
we are having some text values in the variable of the VB form and we have to insert these datas into the MS Access database.
We have opened the database and only one record is inserted in the DB and the latest records are over wiritng the old one.
Below is the codings for updating the database. Please help me how to insert the fields in the next row in the DB.
we are having some text values in the variable of the VB form and we have to insert these datas into the MS Access database.
We have opened the database and only one record is inserted in the DB and the latest records are over wiritng the old one.
Below is the codings for updating the database. Please help me how to insert the fields in the next row in the DB.
Code:
Public Function fopendb(prjname)
Dim con As New Connection
Dim rs As New Recordset
Dim constr
Source = "d:\documents and settings\sdora\Desktop\GTE tracker\PRODUCTIVITY METRICS.mdb"
constr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Source
con.Open constr
rs.Open "Select * from tbl_ProductivityMetrics", con, 1, 2
rs.MoveFirst
While Not rs.EOF
rs!Project_Name = prjname
rs.MoveNext
Wend
End Function
Comment