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

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

UpdateWStatus.mdb (intermediate)

 Post Reply Post Reply
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: UpdateWStatus.mdb (intermediate)
    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, find out why here.<
Back to Top
Sponsored Links

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.