Answer the question
In order to leave comments, you need to log in
How to fix a syntax error?
I'm trying to add codes from a list to another table. Since you need to enter all the elements, I use a loop:
Private Sub save_marks_Click()
Dim strSQL As Variant
For Each strSQL In criteria.ListIndex
strSQL = " Insert Into marks(userid, finalgrade, criteriaid) values ('" & Me.student & "', '" & Me.mark & "', '" & Me.criteria & "');"
CurrentProject.Connection.Execute (strSQL)
Next strSQL
MsgBox ("Added!")
End Sub
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question