Roger's Access Library Homepage
Forum Home Forum Home > Roger's Access Library > Roger's Download Samples
  New Posts New Posts RSS Feed - Reduce97.mdb (advanced)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

>
Want a good read? Try The Summer of His Life (available on Amazon!)

Reduce97.mdb (advanced)

 Post Reply Post Reply
Author
Message
Roger Carlson View Drop Down
Microsoft MVP
Microsoft MVP


Joined: 20 Feb 2008
Status: Offline
Points: 261
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roger Carlson Quote  Post ReplyReply Direct Link To This Post Topic: Reduce97.mdb (advanced)
    Posted: 28 Jul 2008 at 8:04am

Please consider donating $1 per sample downloaded, find out why here.
 

Reduce97.mdb

This was originally designed as a way to delete large amounts of data from very large databases using DAO.
The problem with using a delete query is that it tries to save all the deleted records in memory just so it can ask you if you are really sure at the end. I also needed a way to break into the delete without un-deleting the already deleted records (something else the delete query does not allow). I needed to delete hundreds of thousands of records, and delete queries were not working.

These functions delete the records through VBA. They open a recordset, move to the first record, delete it, and move to the next, and so on. The Simple form just selects records to delete based on only one date. The Advanced form allows you choose a range of dates and also exclude time ranges when the process will not work. By default, it will cancel execution at midnight.

Both forms allow you to break into the delete without un-deleting records. Once they are deleted, they are deleted for good. There is no recovery. That being the case, you should probably back up the table, so you have good data to work with. Click the button below to back up the table.

NOTE: there are better ways to do this, in most cases.  This is a very early sample and one I never converted to Access 2000.  However, I think it has some interesting features and is a good learning tool for DAO programming.

Download
Access 97 (388 KB):
uploads/5/Reduce97.zip

Consider donating $1 per sample downloaded, find out why here.<
Back to Top
Sponsored Links
>
Want a good read? Try The Summer of His Life (available on Amazon!)

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.