dhaskins43
New member
- Local time
- Yesterday, 23:09
- Joined
- Jul 9, 2002
- Messages
- 2
Hi there
I'm using an append query to add records to a linked table. The problem I'm having having is with a [Barcode] field that is indexed to Yes(no duplicates) but Required = No. If I add a record manually without a barcode, it is fine, but when I try to append records with no barcode I'm getting a Key Violation error. I'm assuming it's trying to add Null more than once and considers it a duplicate.
I've been searching all day and have found a few hints but no real answer. Some ideas that looked promising:
? use recordset instead of append query
? use another method to exclude duplicates (validation rule? VBA code?)
? improve the SQL code somehow
Any ideas or directions to point me in would be most appreciated!!
I'm using an append query to add records to a linked table. The problem I'm having having is with a [Barcode] field that is indexed to Yes(no duplicates) but Required = No. If I add a record manually without a barcode, it is fine, but when I try to append records with no barcode I'm getting a Key Violation error. I'm assuming it's trying to add Null more than once and considers it a duplicate.
I've been searching all day and have found a few hints but no real answer. Some ideas that looked promising:
? use recordset instead of append query
? use another method to exclude duplicates (validation rule? VBA code?)
? improve the SQL code somehow
Any ideas or directions to point me in would be most appreciated!!