Print Page | Close Window

Reduce97.mdb (advanced)

Printed From: Roger's Access Library
Category: Roger's Access Library
Forum Name: Roger's Download Samples
Forum Description: A compendium of Microsoft Access 97 and 2000+ routines, each separated into its own sample database.
Printed Date: 27 May 2020 at 8:17pm
Software Version: Web Wiz Forums 12.03 -

Topic: Reduce97.mdb (advanced)
Posted By: Roger Carlson
Subject: Reduce97.mdb (advanced)
Date Posted: 28 Jul 2008 at 8:04am

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


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.

Access 97 (388 KB): - uploads/5/

Consider donating $1 per sample downloaded," rel="nofollow - find out why here .<

Print Page | Close Window

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