[AccessD] (no subject)

Max Wanadoo max.wanadoo at gmail.com
Mon Dec 14 13:54:30 CST 2009


You probably have an index on the table with a unique match of fields and
this entry is trying to add a record which matches the  same unique fields
on the index - hence duplicate.

Max


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: 14 December 2009 19:47
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] (no subject)

Dear List:

 

I am getting an error 3022 - "changes you requested were not successful
because they would product duplicate values..." etc. when the following code
gets to the .Update line.

Dim rstCOCITemp As DAO.Recordset

'add to check-out/check-in table the number of times it's in quantity

Set rstCOCITemp = db.OpenRecordset("Select * FROM tblCheckOutCheckIn") With
rstCOCITemp
    
    .AddNew
    !fldCOCIRADID = argRADID
    !fldCOCIInventoryID = argPackageID
    !fldCOCIInventoryItemID = Null
    !fldCOCICheckOut = Null
    !fldCOCICheckIn = Null
    .Update


fldCOCIRADID, fldCOCIInventoryID, fldCOCIInventoryItemID, are all indexed,
duplicates OK, default value zero.  db is set to Currentdb.

Any ideas why this chunk of code should generate an error 3022?

MTIA

 

Rocky Smolin

Beach Access Software

858-259-4334

www.e-z-mrp.com <http://www.e-z-mrp.com/> 

www.bchacc.com <http://www.bchacc.com/> 

 

 





More information about the AccessD mailing list