I am trying to execute a INSERT INTO string with dbs.execute to eliminate user from having to select yes for every action query prompt but keep getting Run-time error 3061. Too few parameters. expected 1.
Can anyone point out what I am doing wrong here? Thanks!
Private Sub Command25_Click()
Dim dbs As DAO.Database
Set dbs = CurrentDb
If IsNull(EmployeeIdComboBox) = True Then
MsgBox ("Employee ID is NULL")
Exit Sub
Else
End If
If Me.Training1 = True Then
dbs.Execute "INSERT INTO EmployeeTrainings (EmployeeID,TrainingID) VALUES (EmployeeIdComboBox,1)"
Else
End If
'remaining trainings 2 thru 27 will be added here
End Sub