The answer is a definite.... "It depends"! 
Not a lot of info about your dB, but here goes.
From your code, it appears that you are using an unbound form. Why??
It is so much easier to use bound forms......
If the form is used to only add new students, I would have the form bound to the table "TblStudent", the controls bound to the fields and the form property "Default View" set to "Single Form". Access takes care of all the heavy lifting. When you move off of the last control or close the form, the record is saved. The form moves to the "New" record which clears the controls, ready for new data. All you need is a button to close the form.
MOD EDIT: Cleaning up duplicate threads and posts - thought there was a duplicate post here and deleted. Sorry, it was not an exact duplicate but removing doesn't really impact the thread continuity. The suggested code is relevant to both procedures.
I have created a form and on the OK button, I have attached the following VBA to the Event on Click.
If you want to keep the current design, you need a little more code. You posted two versions of the code, so I'm using the second version... but you get the idea.
Code:
On Error GoTo Err_cmdOK_Click
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("TblStudent", dbOpenDynaset)
With rst
.AddNew
![StudentID] = Me.TxtStudentID
![StudentName] = Me.StudentName
![DateOfAdmission] = Me.DoDate
![Level] = Me.Level
![ValueOfContract] = Me.Amount
![SecurityID] = user.SecurityID
.Update
End With
' clear the unbound controls on the form
Me.TxtStudentID = Null
Me.StudentName = Null
Me.DoDate = Null
Me.Level = Null
Me.Amount = Null
Exit_cmdOk_Click:
On Error Resume Next
'cleanup
' - if you open it, close it
' - if you create it, destroy it
rst.Close
Set rst = Nothing
Set dbs = Nothing
Exit Sub
Err_cmdOK_Click:
MsgBox Err.Description
Resume Exit_cmdOk_Click
The code I added is in BLUE
Does this help?