Lisa,

I had tried Dennis' delete query before on a small file made to simulate
your dupes and it worked great but I wanted to be sure it would do no harm
so I tried it on my main db (a copy) hoping it would do nothing since I
didn't have your problem. It showed me 19 picture files it wanted to delete
but they were all non picture files, (HTML, DOC, PDF or whatever) entered as faux sound files and some video. One person had 4 JPG and 4 different files entered as sound files but those "sound" files all share the name ls.jpg and videos all share vs.jpg. I will tell you where to check for any of those. If you never used Sound or video no problem. If you attached a file bill.pdf and a mary.htm both as sound files they will both appear ls.jpg therefore as dupes to this query and the second one will be deleted.

Under FILE / Save family file as..."Accesscopy" and let Access use only that
copy and let Legacy on main data. After you run the delete query on
Accesscopy you can reopen it with Legacy to compare them. I'm sure it will
work.

Copy the SQL below to your clipboard:

DELETE * FROM tblBR
WHERE tblBR.IDBR in (SELECT Max(tblBR.IDBR) AS MaxOfIDBR
FROM tblBR
GROUP BY tblBR.IDIR, tblBR.IDType, tblBR.PicType, tblBR.PicName,
tblBR.IDBPPic
HAVING (((Count(*))>1)))

Next open Accesscopy in Access. Goto tblBR and look at bottom for total # of records and write it down. Go to Queries / New (from toolbar) / you get a popup window "New Query", click OK / you get a popup window "Show Table", click close / From the VIEW menu on top select SQL View, replace the highlited word "Select" with the SQL code that's in your clipboard, (paste over it).

Now go back to View / Datasheet View, It will take a few seconds to come up. When it does you will see a preview of what will be deleted. Note at very bottom left across from "Record" # of "total #). You might want to copy the compete table and paste into Excel.

Click the Inside X (Close Delete Query Window), Answer Yes to the popup,
next change the name to "deletedupes" and clock OK. Now in the list of
Queries select "deletedupes" it will have an x in front of it. When you open
it a popup window warns you and asks are you sure? click yes. After a slight
delay you get a second warning Are you sure? click yes again.

If you look at tblBR now it should be reduced by the # of records deeleted.

Good Luck.
Richard





Have you unlocked the real power of Legacy? Legacy 6.0 Deluxe has 92 features 
not found in the Standard Edition. Learn more about these features at 
http://legacyfamilytree.com/DeluxeEdition.asp.

Legacy User Group guidelines can be found at: 
http://www.LegacyFamilyTree.com/Etiquette.asp

To find past messages, please go to our searchable archives at: 
http://www.mail-archive.com/legacyusergroup@legacyfamilytree.com/

For online technical support, please visit 
http://www.LegacyFamilyTree.com/Help.asp

To unsubscribe please visit: http://www.LegacyFamilyTree.com/LegacyLists.asp


Reply via email to