I am using Access 200.
I have a form which includes text boxes L1, L2 and L3
And a table tblGrades with number fields L1, L2 and L3
I am trying to use following code to add the content of the text fields (L1,
L2, L3) to a new record in the tblGrades table.
I am getting an "Object Required Error" on the Dbs.Execute strSQL
statement.
Any Suggestions would be gratly appreciated.
Private Sub cmdInsert_Click()
Dim strSQL As String
strSQL = "INSERT INTO tblGrades" & "( L1,L2,L3 ) " & _
"SELECT '" & L1 & "', " & _
"SELECT '" & L2 & "', " & _
"SELECT '" & L3 & "', "
Dbs.Execute strSQL ' I GET OBJECT REQUIRED ERROR
Dbs.Close
End Sub