E
enrico via AccessMonster.com
what's the problem when an error: 'Too few parameters. Expected 1' occurs
when i click my save button? my INSERT statement looks like this:
Dim lngResult as Long
IngResult = DMax("ClientID", "tblGenInfo")
strSql = ("INSERT INTO tblResult(GIID, " & _
" DI, D2, D3, D4, D5," & _
" E1, E2, E3, E4, E5," & _
" F1, F2, F3, F4, F5," & _
" G1, G2, G3, G4, G5," & _
" H1, H2, H3, H4, H5," & _
" I1, I2, I3, I4, I5) " & _
"VALUES (IngResult , " & _
" '" & Me.cboD1 & "', '" & Me.cboD2 & "', '" & Me.cboD3 & "', '" & Me.cboD4 &
"', '" & Me.cboD5 & "', " & _
" '" & Me.cboE1 & "', '" & Me.cboE2 & "', '" & Me.cboE3 & "', '" & Me.cboE4 &
"', '" & Me.cboE5 & "', " & _
" '" & Me.cboF1 & "', '" & Me.cboF2 & "', '" & Me.cboF3 & "', '" & Me.cboF4 &
"', '" & Me.cboF5 & "', " & _
" '" & Me.cboG1 & "', '" & Me.cboG2 & "', '" & Me.cboG3 & "', '" & Me.cboG4 &
"', '" & Me.cboG5 & "', " & _
" '" & Me.cboH1 & "', '" & Me.cboH2 & "', '" & Me.cboH3 & "', '" & Me.cboH4 &
"', '" & Me.cboH5 & "', " & _
" '" & Me.cboI1 & "', '" & Me.cboI2 & "', '" & Me.cboI3 & "', '" & Me.cboI4 &
"', '" & Me.cboI5 & "') ")
Set db = CurrentDb()
db.Execute strSql, dbFailOnError
when i click my save button? my INSERT statement looks like this:
Dim lngResult as Long
IngResult = DMax("ClientID", "tblGenInfo")
strSql = ("INSERT INTO tblResult(GIID, " & _
" DI, D2, D3, D4, D5," & _
" E1, E2, E3, E4, E5," & _
" F1, F2, F3, F4, F5," & _
" G1, G2, G3, G4, G5," & _
" H1, H2, H3, H4, H5," & _
" I1, I2, I3, I4, I5) " & _
"VALUES (IngResult , " & _
" '" & Me.cboD1 & "', '" & Me.cboD2 & "', '" & Me.cboD3 & "', '" & Me.cboD4 &
"', '" & Me.cboD5 & "', " & _
" '" & Me.cboE1 & "', '" & Me.cboE2 & "', '" & Me.cboE3 & "', '" & Me.cboE4 &
"', '" & Me.cboE5 & "', " & _
" '" & Me.cboF1 & "', '" & Me.cboF2 & "', '" & Me.cboF3 & "', '" & Me.cboF4 &
"', '" & Me.cboF5 & "', " & _
" '" & Me.cboG1 & "', '" & Me.cboG2 & "', '" & Me.cboG3 & "', '" & Me.cboG4 &
"', '" & Me.cboG5 & "', " & _
" '" & Me.cboH1 & "', '" & Me.cboH2 & "', '" & Me.cboH3 & "', '" & Me.cboH4 &
"', '" & Me.cboH5 & "', " & _
" '" & Me.cboI1 & "', '" & Me.cboI2 & "', '" & Me.cboI3 & "', '" & Me.cboI4 &
"', '" & Me.cboI5 & "') ")
Set db = CurrentDb()
db.Execute strSql, dbFailOnError