Hello guys, I'm new to VBA and trying to create a form for inserting new records into an existing access database, the thing is the database is provided by a third party so I don't have control over it's fields specification. there's already 26705 rows I'd like the insertion of new records to continue in the same sequence, that's the code I've used:
Private Sub Command19_Click ()
Dim dbConf As DAO.Database
Dim rstNew As DAO.Recordset
Set dbConf = CurrentDb
Set rstNew = dbConf.OpenReco rdset("N-MATTE")
rstNew.AddNew
rstNew("DATE"). Value = Me.txtDate.Valu e
rstNew("CLIENT" ).Value = Me.txtClient.Va lue
rstNew.Update
End Sub
Private Sub Command19_Click ()
Dim dbConf As DAO.Database
Dim rstNew As DAO.Recordset
Set dbConf = CurrentDb
Set rstNew = dbConf.OpenReco rdset("N-MATTE")
rstNew.AddNew
rstNew("DATE"). Value = Me.txtDate.Valu e
rstNew("CLIENT" ).Value = Me.txtClient.Va lue
rstNew.Update
End Sub
Comment