Unanswered: Separating out new and unique data from two tables
I have a quick problem. I am using Access 97
Every week by e-mail from a supplier one I get an excel file with 7000 or so data entries (special offers).
I import this into Access and then merge it with Word to produce a printed catalogue. A lot of this data duplicates week from week and the manual job of sorting through and deleting out previous entries all 7000 entries is getting too much (and is not reliable - I'm only human after all)!!
Is there a way (probably with a query) that I could automatically compare the latest table with the previous week' s table and produce a new table that only contains the changes (i.e. only the new data that has been added since the previous week).
This would make my job soooo much easier!!!
A primary key (?) could be the bar code or unique product reference.
I should have said that I'm not to too proficient in Access...
Thank you very much for your further advice.
The 7000 data entries are uniform with say 7 fields (bar code, description, catalogue number, price, date offer expires etc).
The excel spreadsheet contains all the data (7000+ entries) and much of the data is repeated each week. The offers are time sensitive and only get deleted off the spreadsheet (or table) when the special offer date has expired. New titles get added seemingly at random (it is not just a case of seeing what titles have the longest offer expiry date, some are offered for only a very short time).
So it would seem that the date is not a unique identifying factor, as new titles are added with similar dates to items already on the list (I hope that makes sense).
The barcode or catalogue number would, I think, be the only unique identifyer.
I am afraid that I don't know how to run the script that you have suggested.
Can you give me a 'dummies' guide as to what I should do.
Create a form in design view and add a command button.
You will be prompted by the Command Button Wizard - click cancel.
Right-click the button and chose "Build Event..." >> "Code Builder" - click OK.
You are now in the Visual Basic editor.
Copy the following code into the Sub.
doCmd.RunSQL "DELETE FROM <Insert Your Table Name Here>"
'Do not forget the quotes around the SQL statement
Save the code and quit the VB editor.
Save the form.
Open the form and hit the button.
Go check your table - it will now be empty!