Duplicate Keys

  • Thread starter Thread starter JimS
  • Start date Start date
J

JimS

A2007
I have a class where, among other features, I can "clone" a set of detail
items into another header. Works fine, but now I have set up the detail table
to prohibit duplicate part numbers.

My class uses an ADO recordset to populate detail adds and clones. What's
the usual process for detecting and identifying duplicates? Should I use a
recordsetclone? Since "find" method can only use one column, I assume whether
I'm using a recordset clone, or the main recordset, I have to "filter" first,
then find. Of course, there's an index containing the compound key. Too bad I
can't use that...

Ideas? References?

Thanks in Advance

Jim
 
Hi Jim,

I generally use SQL to append records and only the ones that
are allowed will go in using this method to execute:

currentdb.execute strSQL

instead of strSQL, you can also use an action query name

for help constructing SQL in code, refer to Access Basics in
my siggy <smile>

Warm Regards,
Crystal
remote programming and training
http://MSAccessGurus.com

free video tutorials
http://www.YouTube.com/user/LearnAccessByCrystal

Access Basics
http://www.AccessMVP.com/strive4peace
free 100-page book that covers essentials in Access

*
(: have an awesome day :)
*
 
Back
Top