Print Page | Close Window

UpdateWStatus.mdb (intermediate)

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: 28 May 2020 at 11:03am
Software Version: Web Wiz Forums 12.03 -

Topic: UpdateWStatus.mdb (intermediate)
Posted By: Roger Carlson
Subject: UpdateWStatus.mdb (intermediate)
Date Posted: 15 Jul 2008 at 11:20pm

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

This database illustrates two things: 1) How to update a table programmatically with values from another table and 2) how to implement a pop-up status meter.

Update: there are two tables, "Shoes" and "ShoeImport". The module "Import" compares each record from ShoeImport with the Shoes table. If the record exists, it updates the record, if it does not, it adds a new record.

Status Meter: I did not originate the status meter. It comes from a book called "Microsoft Access 2.0 How-To CD" by Ken Getz. The code for the status meter is in the module "basStatusMeter". The functions are called from the Import module. Calls for the status meter can be identified by the "aht" prefix.

Status meters can be difficult to illustrate unless you have a long process to use it with. In this case, the meter is used by calculating the how many records constitute 1% of the total records to be processed (total records / ((total records/100)+1). Every time that many records are processed, the status meter is updated by another 1%.

The over all process is to: 1) Initialize the status meter (ahtInitMeter), 2) update the meter throughout your process (ahtUpdateMeter) and then 3) close the meter (ahtCloseMeter). To use this in your own database, copy the module (basStatusMeter) into your database and then call the various subs in your code. Note: The call for ahtInitMeter has a True/False argument. If you set it to True, put a DoEvents line in your code to be able to cancel the process. If you set it to False, do not put the DoEvents line in.

Access 97 (45 KB): -
Access 2000 DAO (63 KB): -

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. -