S D
accessd667 at yahoo.com
Mon Apr 19 03:44:05 CDT 2004
Hi group,
a user reported an error. The error message displayed the following info:
Source: DAO.Fields
Number: 3265
Description: Item not found in this collection
Call Stack: Switchdatabase.Message_Check_GAS.Check1015
Switchdatabase.Form_frm_GAS_GENERATE.cmdGenerate_Click
The line that causes the error is (see code below for details):
rv = MsgBox("Duplicate value!! Delete original record?" & vbCr _
, vbYesNo, "Answer question")
WHY does this occur?
The user is using Win NT. The error does NOT occur on Win2000. We never had this problem before, not on NT and not on Win2000.
Please advise!
TIA
Sander
This is the code that caused the problem:
Public Function Check_1015(msgtype As String) As String
Dim Status As String
Dim rs, rsb As Recordset
Dim db As Database
Dim teller, i As Long
Dim rv As String
On Error GoTo Check_1015_Error
Status = "Ok"
If msgtype = "I" Then
...
...
Set rsb = db.OpenRecordset("Select * from V4_GAS_Bronbestand_Verhuizingen where connect_EAN = '" & rs!Connect_EAN & "'", dbReadOnly)
If rsb.EOF = False Then
rv = MsgBox("Duplicate value!! Delete original record?" & vbCr _
, vbYesNo, "Answer question")
....
---------------------------------
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢