I reviewed my post and I found that I mistakenly made a double entry in the clear statements on the txtEmployeeID, but I re-construct it and re-run the form and also typed a number on the age and date of birth field which I also found that I mistakenly used text instead of numbers.
Here is the code which I reconstructed.
Code:
Option Compare Database
Private Sub Command31_Click()
CurrentDb.Execute "INSERT INTO info(EmployeeName, Gender, Age, DateOfBirth) " & _
" VALUES(" & Me.txtEmployeeName & " ,'" & Me.txtGender & "','" & Me.txtAge & "','" & _
Me.txtDateOfBirth & "')"
infoSubform.Form.Requery
End Sub
Private Sub Command36_Click()
Me.txtEmployeeID = ""
Me.txtEmployeeName = ""
Me.txtGender = ""
Me.txtAge = Null
Me.txtGender = ""
Me.txtDateOfBirth = Null
Me.txtEmployeeID.SetFocus
End Sub
Private Sub Command37_Click()
DoCmd.Close
End Sub
And here is here is the error code that I'm getting when I click the clear button.