Got a simple problem with an update query that checks for duplicate information and updates the table. Both queries are written dynamically. The first query is saved as a query, the second is run using DoCmd.RunSQL
WHERE tblLeads.Campaign=2 AND tblLeads.LeadDate>#1/30/2006#
GROUP BY tblLeads.EmailAdd
UPDATE tblLeads INNER JOIN qryTestDupEmail
ON tblLeads.EmailAdd = qryTestDupEmail.EmailAdd
SET tblLeads.DupLead = True, tblLeads.WhyReturned = 'Duplicate lead'
WHERE tblLeads.LeadID)>38275 AND tblLeads.Campaign=2;
Access reports "Operation must use an updateable query" (no number given)
Due to the number of records, DCount, especially in a query, would have been very slow, so I opted for the temp table. It's too bad Access has still not embraced the "Unbound Recordset" because this would be a good example of when to use one.