Jim Dettman
jimdettman at verizon.net
Tue Jun 8 11:50:41 CDT 2010
If your willing to experiment a bit, try changing the field name (ie. TestThisOut) and then see if it works with the *. I have seen in the past where with certain field names, Access or JET gets tripped up and just doesn't process it correctly. If that does fix it, then I would try creating a new table def with just fldPODRevision in it and maybe an autonumber. If it then fails with that table, it would definitely pin it down to the field name itself causing the problem rather then being some form of table corruption. And BTW, this is a JET table right? Not using ODBC are you? Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, June 08, 2010 11:42 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Item Not Found In This Collection Gustav: So I changed the set of the PODetail recordsets from: 'Set rsPODetail = db.OpenRecordset("Select * FROM tblPODetail WHERE fldPOHID = " & Me.fldPOHID) 'Set rsPODetailNew = db.OpenRecordset("Select * FROM tblPODetail") to: Set rsPODetail = db.OpenRecordset("Select fldPODRevision, fldPODPosted, fldPODTaxable, " _ & " fldPODQuantityReceived, fldPODQuantityOrdered, fldPODDateRequired, " _ & "fldPODUnitCost, fldPODUOM, fldPODPartDescription, fldPODVendorPart, " _ & "fldPODPartNumber, fldPODLineNumber, fldPOHID, fldPODID " _ & "FROM tblPODetail WHERE fldPOHID = " & Me.fldPOHID) Set rsPODetailNew = db.OpenRecordset("Select fldPODRevision, fldPODPosted, fldPODTaxable, " _ & " fldPODQuantityReceived, fldPODQuantityOrdered, fldPODDateRequired, " _ & "fldPODUnitCost, fldPODUOM, fldPODPartDescription, fldPODVendorPart, " _ & "fldPODPartNumber, fldPODLineNumber, fldPOHID, fldPODID FROM tblPODetail") And that works. But why? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, June 08, 2010 8:31 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Item Not Found In This Collection Hi Rocky Try adding the other fields one by one. /gustav >>> rockysmolin at bchacc.com 08-06-2010 17:09 >>> Gustav: Yes. I inserted this code: Set rsPODetail = db.OpenRecordset("Select fldPODRevision FROM tblPODetail WHERE fldPOHID = " & Me.fldPOHID) If rsPODetail.BOF = False And rsPODetail.EOF = False Then rsPODetail.MoveLast MsgBox rsPODetail.RecordCount Do While rsPODetail.EOF = False MsgBox rsPODetail!fldPODRevision and the record count comes up with 3 - that's correct. And the MsgBox displayed rsPODetail!fldPODRevision without a problem. Any clues there? TIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com