R
Richard Hollenbeck
I'm stumped. I have identical code for B, C, D, and F, but A is first and
it's stopping here. Once the A part is fixed, I can just modify the B,C,D,
and F SQL statements to match. I can't see anything wrong with my code.
I'm getting an error MsgBox saying:
Run-time error '3061'
Too few parameters, Expected 2.
End|Debug|Help
Here's the subroutine:
Private Sub cmdSaveLetterGrades_Click()
'Inserts minimum and maximum grades for A, B, C, D, and F into the
tblOptions table
Dim StrSQL As String
lbl_LGMessages.ForeColor = 16711680
lbl_LGMessages.Caption = "Saving Changes. . ."
StrSQL = "UPDATE tblOptions SET tblOptions.minScore = txtAMin.value,
tblOptions.maxScore = txtAMax.value WHERE (((tblOptions.letterGrade)='A'));"
'StrSQL is all on one line but takes two lines in this post
' txtAMin and txtAMax are text boxes on the form.
CurrentDb.Execute StrSQL, dbFailOnError
'followed here by the B, C, D, and F code
lbl_LGMessages.ForeColor = 0
lbl_LGMessages.Caption = ""
End Sub
it's stopping here. Once the A part is fixed, I can just modify the B,C,D,
and F SQL statements to match. I can't see anything wrong with my code.
I'm getting an error MsgBox saying:
Run-time error '3061'
Too few parameters, Expected 2.
End|Debug|Help
Here's the subroutine:
Private Sub cmdSaveLetterGrades_Click()
'Inserts minimum and maximum grades for A, B, C, D, and F into the
tblOptions table
Dim StrSQL As String
lbl_LGMessages.ForeColor = 16711680
lbl_LGMessages.Caption = "Saving Changes. . ."
StrSQL = "UPDATE tblOptions SET tblOptions.minScore = txtAMin.value,
tblOptions.maxScore = txtAMax.value WHERE (((tblOptions.letterGrade)='A'));"
'StrSQL is all on one line but takes two lines in this post
' txtAMin and txtAMax are text boxes on the form.
CurrentDb.Execute StrSQL, dbFailOnError
'followed here by the B, C, D, and F code
lbl_LGMessages.ForeColor = 0
lbl_LGMessages.Caption = ""
End Sub