>I need to create a form that displays a list of records that are possible duplicates and give the user an opportunity to delete or change the records. The following SQL statements produces the recordset I'm looking for, but I'm having trouble presenting this to the user so the data can be edited. I created a form with a grid but I can't figure out how to have the grid display these records. Can I crate a local view through code for this?
>
>SELECT * FROM helthins WHERE helthins.ssno IN (SELECT ssno;
>FROM helthins;
>GROUP BY dedtype, ssno, sortkey;
>HAVING COUNT(*)>1);
>ORDER BY ssno;
>INTO CURSOR helthins_dupes
When you use GROUP you squeeze source records to one for each group, therefore IMO it's more reliable, at least, to provide programmatic link between cursor and source table, i.e. anytime a user delete a record, you find all records with the same dedtype+ssno+sortkey in source table and delete them programmatically.
Edward Pikman
Independent Consultant