jwcolby
jwcolby at colbyconsulting.com
Sun Aug 5 20:28:31 CDT 2007
Build a unique index on all seven fields. Then when you save, if it goes in, there is no duplicate. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at Beach Access Software Sent: Sunday, August 05, 2007 8:25 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Duplicate Record? Dear List: I guess this is my weekend for questions. Using DAO I am creating a temp table of emails to be sent. So I do an .AddNew and assemble the data in the fields of the new record. Just before I .Update, I want to look at the existing records in the recordset and if the record I've just created is a duplicate I don't want to add the record so the person only gets one email. My first idea was to brute force check each field in a FindFirst but there must be a simpler or more elegant way of doing this. There are seven fields to check. MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com