	******************************
	* ACCTIMER.DLL Documentation *
	******************************

For additional information, see the comments in the C code (sorry).

Originally TIMERDLL.DLL by Paul Vick (address unknown)

Modified by:
	Bob Denny
	[75226,3126] (Compuserve, 75226.3126@compuserve.com)

Now called ACCTIMER. This version has time intervals in seconds instead
of milliseconds. Nothing happens in milliseconds with Access (grin)!
It also accepts up to 8 timers, each with its own interval in seconds
and a specified macro to run. See SetAccessTimer() and KillAccessTimer()
comments for calling params.

When the DLL is loaded, a 1 second internal timer is started. At each
tick, the list of timers is checked for active ones, and each is serviced
in turn as needed. The internal timer runs for the entire time the DLL
stays loaded. Don't worry about the overhead. _Looking_ at Access will 
use more time than the internal timer will use in a year (grin).

WARNING: I do not know whether Access ACKnowledges DDE macro requests
when the macro starts or when the macro finishes. In any case, there
is the potential for problems if a timer interval is shorter than the
time needed for the corresponding macro to complete. CAVEAT! I also do
not know whether Access can accept additional DDE macro execution
requests while it is running a macro from a previous DDE request.
TIMING BUGS ARE A REAL POSSIBILITY.

In order to make things as safe as possible, the timer service routine
will not send a macro execute DDE request if one is already active.
The timer service routine could be entered while still active from
the previous 1-second tick's call. Calling DDE to send a request on
a connection with an already active transaction seems like asking for
trouble. So if the timer service routine is entered while a DDE
transaction is active, the timers will be decremented until they reach
0, and DDE requests will be made serially.

NOTE: Timers that need service at the same time are run in order of their 
timer number (see below <ugh>).

ANOTHER WARNING: Don't try to use this DLL from more than one instance
(copy) of Access running concurrently!

INSTALLATION
------------

1) Put ACCTIMER.DLL file somewhere in your path

2) In your Access database, put the following declarations 
   (each on 1 line, of course!)

'
' ACCTIMER.DLL Functions
'
Declare Function SetAccessTimer Lib "ACCTIMER.DLL" \  <== on 1 line (ugh!)
	(ByVal TimerNo As Integer, ByVal IntervalSec As Integer, \
	ByVal MacroToRun As String) As Integer
Declare Sub KillAccessTimer Lib "ACCTIMER.DLL" (ByVal TimerNo As Integer)

USAGE
-----

To start a timer, call SetAccessTimer as a function with these args:

	TimerNo		Timer number, 0-7 are legal
	IntervalSec	Interval between macro executions, seconds
	MacroToRun	Name of Access macro to run at each interval

If True is returned, the timer is active. False means an error occurred.
There is no way to tell why it failed. Trying to start an already active
timer is a common error. If the timer number is out of range 0-7, or if
the interval is not positive and non-zero, or if the macro name is an 
empty string, the call will fail.

Example:
	StartAccessTimer(2, 30, "Utilities.ScanSystem")

This will run the "Utilities.ScanSystem" macro at intervals of about 30 
seconds, using timer #2.

To kill a timer, call KillAccessTimer with this arg:

	TimerNo		Timer number, 0-7.

Example:
	KillAccessTimer(2)

This will stop timer number 2.
	
NOTE: To kill all timers with a single call, call KillAccessTimer with an 
argument of -1 (or any negative number).


CAVEATS
-------

I MAKE NO WARRANTIES, IMPLIED OR OTHERWISE, AS TO THE FITNESS FOR A 
PARTICULAR PURPOSE OF THIS DLL AND/OR THE SOURCES, NOR DO I CLAIM ANY 
COPYRIGHT OR OWNERSHIP OF ANY PART.

There is a limit of 8 timers.

Intervals are limited to 32767 seconds.

There isn't very good error reporting from the DLLl. If something fails, 
you're not told what it is.

Care must be taken that you start the timer only AFTER you're sure that 
the macro it executes is OK. If an error occurs and your timer interval
is small enough, you might not be able to fix the error or stop the timer 
before the next timer interval ends and another error pops up. Thus, you'd 
have to reboot before you could fix the problem.

DO NOT USE THE DLL FROM MORE THAN 1 ACTIVE INSTANCE OF ACCESS.

