Tupacmoche
Registered User.
- Local time
- Today, 08:45
- Joined
- Apr 28, 2008
- Messages
- 291
I have an Access textbox with an after Update event that run this code. Simply put it gets a ten digit string that is passed to an SQL sproc that creates a record and inserts it into a table. Here is the code:
I get a runtime error message 3265: Item not found in this collect. Does anyone see what's wrong?
I get a runtime error message 3265: Item not found in this collect. Does anyone see what's wrong?

Code:
If ValidDonorID = 1 Then
LResponse = MsgBox("Is this the Donor your looking for " + DonorName + "?", vbYesNo, "Continue")
If LResponse = vbYes Then
MsgBox ("Adding new prospect!") '**** THIS IS WHERE THE CODE WILL GO TO UPDATE THE TABLE **** - Stored Procedure
'*****Run sproc to add new donor to CPM *************************
Set cdb = CurrentDb
Set qdef = cdb.CreateQueryDef("")
qdef.Connect = cdb.TableDefs("dbo_Import_MRN").Connect
qdef.SQL = "EXEC dbo.sp_MRN_CleanUp" 'Simple runs a truncate table
qdef.ReturnsRecords = False
qdef.Execute dbFailOnError
Set qdef = Nothing
Set cdb = Nothing
'******End of sproc ********************************************
MsgBox ("New prospect added!")
Else
MsgBox ("Please try again!")
End If
Else
MsgBox ("Donor with Id_Number: " & DonorNum & " does not exist, try again or add to Advance!")
Me.txtAddDonor.Value = ""
End If
End Sub