wedd
11-30-2011, 11:28 AM
Hi experts, I receive this error message and I not sure why. I wrote the following code and was wondering if you can see any issues within the code. hanks for your contributions.:friends:
I receive this error message error 3061: Too few parameters expected 8. Do you know what this error means? I have written the code below
Private Sub cboLocations_NotInList(NewData As String, Response As Integer)
On Error GoTo myError
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("Query2", dbOpenDynaset)
If vbYes = MsgBox("This Entry is not in list. Do you wish to add " _
& NewData & " as a new category?", _
vbYesNoCancel + vbDefaultButton2, _
"New Venue") Then
rst.AddNew
rst!Query2 = NewData
rst.Update
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
leave:
If Not rst Is Nothing Then
rst.Close: Set rst = Nothing
End If
Exit Sub
myError:
MsgBox "Error " & Err.Number & ": " & Error$
Resume leave
End Sub
I receive this error message error 3061: Too few parameters expected 8. Do you know what this error means? I have written the code below
Private Sub cboLocations_NotInList(NewData As String, Response As Integer)
On Error GoTo myError
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("Query2", dbOpenDynaset)
If vbYes = MsgBox("This Entry is not in list. Do you wish to add " _
& NewData & " as a new category?", _
vbYesNoCancel + vbDefaultButton2, _
"New Venue") Then
rst.AddNew
rst!Query2 = NewData
rst.Update
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
leave:
If Not rst Is Nothing Then
rst.Close: Set rst = Nothing
End If
Exit Sub
myError:
MsgBox "Error " & Err.Number & ": " & Error$
Resume leave
End Sub